diff --git a/src/gui/Src/Gui/CPUDisassembly.cpp b/src/gui/Src/Gui/CPUDisassembly.cpp index 1b103271..a97052c8 100644 --- a/src/gui/Src/Gui/CPUDisassembly.cpp +++ b/src/gui/Src/Gui/CPUDisassembly.cpp @@ -1466,7 +1466,7 @@ void CPUDisassembly::paintEvent(QPaintEvent* event) auto sidebar = mParentCPUWindow->getSidebarWidget(); if(sidebar) - sidebar->repaint(); + sidebar->reload(); // Signal to render the original content Disassembly::paintEvent(event); diff --git a/src/gui/Src/Gui/CPUSideBar.cpp b/src/gui/Src/Gui/CPUSideBar.cpp index a1cbde7e..c7e50ccd 100644 --- a/src/gui/Src/Gui/CPUSideBar.cpp +++ b/src/gui/Src/Gui/CPUSideBar.cpp @@ -87,11 +87,11 @@ void CPUSideBar::debugStateChangedSlot(DBGSTATE state) { if(state == stopped) { - repaint(); //clear + reload(); //clear } } -void CPUSideBar::repaint() +void CPUSideBar::reload() { fontHeight = mDisas->getRowHeight(); viewport()->update(); @@ -102,7 +102,7 @@ void CPUSideBar::changeTopmostAddress(dsint i) topVA = i; memset(®Dump, 0, sizeof(REGDUMP)); DbgGetRegDump(®Dump); - repaint(); + reload(); } void CPUSideBar::setViewableRows(int rows) @@ -115,7 +115,7 @@ void CPUSideBar::setSelection(dsint selVA) if(selVA != selectedVA) { selectedVA = selVA; - repaint(); + reload(); } } @@ -373,7 +373,7 @@ void CPUSideBar::mouseReleaseEvent(QMouseEvent* e) mCodeFoldingManager.delFoldSegment(wVA); } mDisas->reloadData(); - viewport()->repaint(); + viewport()->update(); } } if(x < bulletX - mBulletRadius) diff --git a/src/gui/Src/Gui/CPUSideBar.h b/src/gui/Src/Gui/CPUSideBar.h index ba0c996a..976495d5 100644 --- a/src/gui/Src/Gui/CPUSideBar.h +++ b/src/gui/Src/Gui/CPUSideBar.h @@ -38,7 +38,7 @@ public slots: void updateFonts(); void debugStateChangedSlot(DBGSTATE state); - void repaint(); + void reload(); void changeTopmostAddress(dsint i); void setViewableRows(int rows); void setSelection(dsint selVA); diff --git a/src/gui/Src/Gui/CPUWidget.cpp b/src/gui/Src/Gui/CPUWidget.cpp index e60b799c..8ee49ef8 100644 --- a/src/gui/Src/Gui/CPUWidget.cpp +++ b/src/gui/Src/Gui/CPUWidget.cpp @@ -24,7 +24,7 @@ CPUWidget::CPUWidget(QWidget* parent) : QWidget(parent), ui(new Ui::CPUWidget) connect(mDisas, SIGNAL(selectionChanged(dsint)), mSideBar, SLOT(setSelection(dsint))); connect(mDisas, SIGNAL(disassembledAt(dsint, dsint, bool, dsint)), mArgumentWidget, SLOT(disassembledAtSlot(dsint, dsint, bool, dsint))); connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), mSideBar, SLOT(debugStateChangedSlot(DBGSTATE))); - connect(Bridge::getBridge(), SIGNAL(updateSideBar()), mSideBar, SLOT(repaint())); + connect(Bridge::getBridge(), SIGNAL(updateSideBar()), mSideBar, SLOT(reload())); connect(Bridge::getBridge(), SIGNAL(updateArgumentView()), mArgumentWidget, SLOT(refreshData())); mDisas->setCodeFoldingManager(mSideBar->getCodeFoldingManager()); diff --git a/src/gui/Src/Gui/RegistersView.cpp b/src/gui/Src/Gui/RegistersView.cpp index b4535bf3..0fe623a7 100644 --- a/src/gui/Src/Gui/RegistersView.cpp +++ b/src/gui/Src/Gui/RegistersView.cpp @@ -1139,7 +1139,7 @@ RegistersView::RegistersView(CPUWidget* parent, CPUMultiDump* multiDump) : QScro connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(displayCustomContextMenuSlot(QPoint))); connect(Bridge::getBridge(), SIGNAL(dbgStateChanged(DBGSTATE)), this, SLOT(debugStateChangedSlot(DBGSTATE))); // self communication for repainting (maybe some other widgets needs this information, too) - connect(this, SIGNAL(refresh()), this, SLOT(repaint())); + connect(this, SIGNAL(refresh()), this, SLOT(reload())); // context menu actions connect(wCM_Increment, SIGNAL(triggered()), this, SLOT(onIncrementAction())); connect(wCM_ChangeFPUView, SIGNAL(triggered()), this, SLOT(onChangeFPUViewAction())); @@ -1201,14 +1201,14 @@ void RegistersView::fontsUpdatedSlot() mRowHeight = wRowsHeight; mCharWidth = QFontMetrics(this->font()).averageCharWidth(); setFixedHeight(getEstimateHeight()); - repaint(); + reload(); } void RegistersView::ShowFPU(bool set_showfpu) { mShowFpu = set_showfpu; InitMappings(); - repaint(); + reload(); } @@ -2521,7 +2521,7 @@ void RegistersView::debugStateChangedSlot(DBGSTATE state) } } -void RegistersView::repaint() +void RegistersView::reload() { this->viewport()->update(); } diff --git a/src/gui/Src/Gui/RegistersView.h b/src/gui/Src/Gui/RegistersView.h index adaac36f..1768e85e 100644 --- a/src/gui/Src/Gui/RegistersView.h +++ b/src/gui/Src/Gui/RegistersView.h @@ -107,10 +107,11 @@ public slots: void displayCustomContextMenuSlot(QPoint pos); void setRegister(REGISTER_NAME reg, duint value); void debugStateChangedSlot(DBGSTATE state); - void repaint(); + void reload(); void ShowFPU(bool set_showfpu); void onChangeFPUViewAction(); void SetChangeButton(QPushButton* push_button); + signals: void refresh();