From c2ff87fd8d6aed6500dcd8eff50711c6a9c0d67e Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 6 Oct 2021 23:28:31 +0100 Subject: [PATCH] Positioning register inspection window at the center of the main Insight window --- .../TargetRegisterInspector/TargetRegisterInspectorWindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp index 1902fba2..236e6a77 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetRegisterInspector/TargetRegisterInspectorWindow.cpp @@ -210,6 +210,10 @@ TargetRegisterInspectorWindow::TargetRegisterInspectorWindow( this->updateRegisterValueInputField(); this->onTargetStateChanged(currentTargetState); + + // Position the inspection window at the center of the main Insight window + this->move(parent->window()->geometry().center() - this->rect().center()); + this->show(); }