diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp index a883baeb..81ff41a6 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp @@ -28,11 +28,15 @@ TargetRegisterInspectorWindow::TargetRegisterInspectorWindow( const Targets::TargetRegisterDescriptor& registerDescriptor, InsightWorker& insightWorker, TargetState currentTargetState, - std::optional registerValue + std::optional registerValue, + QWidget* parent ): -registerDescriptor(registerDescriptor), -insightWorker(insightWorker), -registerValue(registerValue.value_or(Targets::TargetMemoryBuffer(registerDescriptor.size, 0))) { + QWidget(parent), + registerDescriptor(registerDescriptor), + insightWorker(insightWorker), + registerValue(registerValue.value_or(Targets::TargetMemoryBuffer(registerDescriptor.size, 0))) +{ + this->setWindowFlag(Qt::Window); auto registerName = QString::fromStdString(this->registerDescriptor.name.value()).toUpper(); this->setObjectName("target-register-inspector-window"); this->setWindowTitle("Inspect Register"); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp index 01d46235..409d179a 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.hpp @@ -63,7 +63,8 @@ namespace Bloom::Widgets const Targets::TargetRegisterDescriptor& registerDescriptor, InsightWorker& insightWorker, Targets::TargetState currentTargetState, - std::optional registerValue = std::nullopt + std::optional registerValue = std::nullopt, + QWidget* parent = nullptr ); static bool registerSupported(const Targets::TargetRegisterDescriptor& descriptor); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp index dd4cc204..9b604109 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegistersPane/RegisterWidget.cpp @@ -102,7 +102,8 @@ void RegisterWidget::openInspectionWindow() { this->descriptor, this->insightWorker, this->targetState, - this->currentRegister.has_value() ? std::optional(this->currentRegister->value) : std::nullopt + this->currentRegister.has_value() ? std::optional(this->currentRegister->value) : std::nullopt, + this ); } else {