From e83ce7de8f5763686f147cae7bd9028c7c358491 Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 7 Mar 2023 22:39:49 +0000 Subject: [PATCH] Tidying --- .../HexViewerWidget/FocusedRegionGroupItem.cpp | 4 ++-- .../HexViewerWidget/HexViewerWidget.cpp | 4 ++-- .../HexViewerWidget/ItemGraphicsScene.cpp | 5 ++--- .../HexViewerWidget/ItemGraphicsScene.hpp | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/FocusedRegionGroupItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/FocusedRegionGroupItem.cpp index d63c9e65..d58abca5 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/FocusedRegionGroupItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/FocusedRegionGroupItem.cpp @@ -182,8 +182,8 @@ namespace Bloom::Widgets ) const { auto labelText = this->focusedMemoryRegion.name; - static const auto lineColor = QColor(0x4F, 0x4F, 0x4F); - static const auto labelFontColor = QColor(0x68, 0x68, 0x68); + static constexpr auto lineColor = QColor(0x4F, 0x4F, 0x4F); + static constexpr auto labelFontColor = QColor(0x68, 0x68, 0x68); static auto labelFont = QFont("'Ubuntu', sans-serif"); labelFont.setPixelSize(12); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp index 9515797e..3cfa764a 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerWidget.cpp @@ -199,7 +199,7 @@ namespace Bloom::Widgets void HexViewerWidget::refreshRegions() { if (this->byteItemGraphicsScene != nullptr) { - this->byteItemGraphicsScene->refreshRegions(); + this->byteItemGraphicsScene->rebuildItemHierarchy(); } } @@ -230,7 +230,7 @@ namespace Bloom::Widgets this->settings.highlightStackMemory = enabled; if (this->byteItemGraphicsScene != nullptr) { - this->byteItemGraphicsScene->update(); + this->byteItemGraphicsScene->rebuildItemHierarchy(); } } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.cpp index 12035b30..4c0098dc 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.cpp @@ -156,7 +156,7 @@ namespace Bloom::Widgets void ItemGraphicsScene::updateStackPointer(std::uint32_t stackPointer) { this->state.currentStackPointer = stackPointer; - this->update(); + this->rebuildItemHierarchy(); } void ItemGraphicsScene::selectByteItems(const std::set& addresses) { @@ -172,11 +172,10 @@ namespace Bloom::Widgets this->update(); } - void ItemGraphicsScene::refreshRegions() { + void ItemGraphicsScene::rebuildItemHierarchy() { this->topLevelGroup->rebuildItemHierarchy(); this->flattenedItems = this->topLevelGroup->flattenedItems(); this->adjustSize(); - return; } void ItemGraphicsScene::adjustSize() { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp index 275b82eb..dbc71ccc 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp @@ -55,7 +55,7 @@ namespace Bloom::Widgets void init(); void updateStackPointer(Targets::TargetStackPointer stackPointer); void selectByteItems(const std::set& addresses); - void refreshRegions(); + void rebuildItemHierarchy(); void adjustSize(); void setEnabled(bool enabled); void refreshValues();