From f3cd27ee82372e10d25699f3761873b27928b050 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 15 Mar 2023 21:17:21 +0000 Subject: [PATCH] Stop needlessly resetting the capture snapshot form --- .../CreateSnapshotWindow/CreateSnapshotWindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/CreateSnapshotWindow/CreateSnapshotWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/CreateSnapshotWindow/CreateSnapshotWindow.cpp index 5115e8cf..e138b0ce 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/CreateSnapshotWindow/CreateSnapshotWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/SnapshotManager/CreateSnapshotWindow/CreateSnapshotWindow.cpp @@ -84,6 +84,10 @@ namespace Bloom::Widgets this->refreshForm(); } ); + + this->includeFocusedRegionsInput->setChecked(true); + this->captureDirectlyFromTargetInput->setChecked(false); + this->resetForm(); } void CreateSnapshotWindow::refreshForm() { @@ -93,7 +97,6 @@ namespace Bloom::Widgets void CreateSnapshotWindow::showEvent(QShowEvent* event) { this->move(this->parentWidget()->window()->geometry().center() - this->rect().center()); - this->resetForm(); this->refreshForm(); QWidget::showEvent(event); } @@ -117,8 +120,6 @@ namespace Bloom::Widgets void CreateSnapshotWindow::resetForm() { this->nameInput->setText("Untitled Snapshot"); this->descriptionInput->setPlainText(""); - this->includeFocusedRegionsInput->setChecked(true); - this->captureDirectlyFromTargetInput->setChecked(false); } void CreateSnapshotWindow::issueCaptureRequest() { @@ -136,5 +137,6 @@ namespace Bloom::Widgets ); this->close(); + this->resetForm(); } }