From 9a43017453378e6ca12db62023febb0d779b07f7 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 10 Jun 2023 15:50:54 +0100 Subject: [PATCH] Tidying --- .../UserInterfaces/InsightWindow/Widgets/PlainTextEdit.cpp | 2 +- .../HexViewerWidget/ItemGraphicsScene.hpp | 4 +++- .../Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp | 2 +- .../UserInterfaces/InsightWindow/Widgets/TextInput.cpp | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/PlainTextEdit.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/PlainTextEdit.cpp index 9d834a72..8e40df50 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/PlainTextEdit.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/PlainTextEdit.cpp @@ -11,7 +11,7 @@ namespace Bloom::Widgets void PlainTextEdit::contextMenuEvent(QContextMenuEvent* event) { if (QMenu* menu = this->createStandardContextMenu()) { - menu->setAttribute(Qt::WA_DeleteOnClose); + menu->setAttribute(Qt::WA_DeleteOnClose, true); // Remove default icons for (auto& action : menu->actions()) { diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp index b815731f..6e39ff2a 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ItemGraphicsScene.hpp @@ -66,7 +66,9 @@ namespace Bloom::Widgets signals: void ready(); void hoveredAddress(const std::optional& address); - void selectionChanged(const std::unordered_map& selectedByteItemsByAddress); + void selectionChanged( + const std::unordered_map& selectedByteItemsByAddress + ); protected: bool enabled = true; diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp index 0fd91719..31a77b7c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/TargetRegistersPaneWidget.cpp @@ -383,7 +383,7 @@ namespace Bloom::Widgets this->targetState = newState; - if (this->targetState == Targets::TargetState::RUNNING) { + if (this->targetState != Targets::TargetState::STOPPED) { this->clearInlineRegisterValues(); } } diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.cpp index cbceafb5..d8affbc5 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TextInput.cpp @@ -11,7 +11,7 @@ namespace Bloom::Widgets void TextInput::contextMenuEvent(QContextMenuEvent* event) { if (QMenu* menu = this->createStandardContextMenu()) { - menu->setAttribute(Qt::WA_DeleteOnClose); + menu->setAttribute(Qt::WA_DeleteOnClose, true); // Remove default icons for (auto& action : menu->actions()) {