mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Prevent the update of some widgets while debug task is in progress to avoid freezing
This commit is contained in:
parent
2fb59b26ad
commit
96baaeada6
@ -38,9 +38,10 @@ BacktraceWidget::~BacktraceWidget() {}
|
||||
|
||||
void BacktraceWidget::updateContents()
|
||||
{
|
||||
if (!refreshDeferrer->attemptRefresh(nullptr)) {
|
||||
if (!refreshDeferrer->attemptRefresh(nullptr) || Core()->isDebugTaskInProgress()) {
|
||||
return;
|
||||
}
|
||||
|
||||
setBacktraceGrid();
|
||||
}
|
||||
|
||||
|
@ -72,16 +72,16 @@ void ProcessesWidget::updateContents()
|
||||
return;
|
||||
}
|
||||
|
||||
if (Core()->currentlyDebugging) {
|
||||
setProcessesGrid();
|
||||
} else {
|
||||
if (!Core()->currentlyDebugging) {
|
||||
// Remove rows from the previous debugging session
|
||||
modelProcesses->removeRows(0, modelProcesses->rowCount());
|
||||
return;
|
||||
}
|
||||
|
||||
if (Core()->isDebugTaskInProgress() || !Core()->currentlyDebugging) {
|
||||
if (Core()->isDebugTaskInProgress()) {
|
||||
ui->viewProcesses->setDisabled(true);
|
||||
} else {
|
||||
setProcessesGrid();
|
||||
ui->viewProcesses->setDisabled(false);
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ void SectionsWidget::initConnects()
|
||||
|
||||
void SectionsWidget::refreshSections()
|
||||
{
|
||||
if (!sectionsRefreshDeferrer->attemptRefresh(nullptr)) {
|
||||
if (!sectionsRefreshDeferrer->attemptRefresh(nullptr) || Core()->isDebugTaskInProgress()) {
|
||||
return;
|
||||
}
|
||||
sectionsModel->beginResetModel();
|
||||
|
@ -58,7 +58,7 @@ StackWidget::~StackWidget() = default;
|
||||
|
||||
void StackWidget::updateContents()
|
||||
{
|
||||
if (!refreshDeferrer->attemptRefresh(nullptr)) {
|
||||
if (!refreshDeferrer->attemptRefresh(nullptr) || Core()->isDebugTaskInProgress()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -71,16 +71,16 @@ void ThreadsWidget::updateContents()
|
||||
return;
|
||||
}
|
||||
|
||||
if (Core()->currentlyDebugging) {
|
||||
setThreadsGrid();
|
||||
} else {
|
||||
if (!Core()->currentlyDebugging) {
|
||||
// Remove rows from the previous debugging session
|
||||
modelThreads->removeRows(0, modelThreads->rowCount());
|
||||
return;
|
||||
}
|
||||
|
||||
if (Core()->isDebugTaskInProgress() || !Core()->currentlyDebugging) {
|
||||
if (Core()->isDebugTaskInProgress()) {
|
||||
ui->viewThreads->setDisabled(true);
|
||||
} else {
|
||||
setThreadsGrid();
|
||||
ui->viewThreads->setDisabled(false);
|
||||
}
|
||||
}
|
||||
|
@ -291,6 +291,12 @@ QList<QString> VisualNavbar::sectionsForAddress(RVA address)
|
||||
QString VisualNavbar::toolTipForAddress(RVA address)
|
||||
{
|
||||
QString ret = "Address: " + RAddressString(address);
|
||||
|
||||
// Don't append sections when a debug task is in progress to avoid freezing the interface
|
||||
if (Core()->isDebugTaskInProgress()) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
auto sections = sectionsForAddress(address);
|
||||
if (sections.count()) {
|
||||
ret += "\nSections: \n";
|
||||
|
Loading…
Reference in New Issue
Block a user