Stop needlessly resetting the capture snapshot form

This commit is contained in:
Nav
2023-03-15 21:17:21 +00:00
parent b645606e1b
commit f3cd27ee82

View File

@@ -84,6 +84,10 @@ namespace Bloom::Widgets
this->refreshForm(); this->refreshForm();
} }
); );
this->includeFocusedRegionsInput->setChecked(true);
this->captureDirectlyFromTargetInput->setChecked(false);
this->resetForm();
} }
void CreateSnapshotWindow::refreshForm() { void CreateSnapshotWindow::refreshForm() {
@@ -93,7 +97,6 @@ namespace Bloom::Widgets
void CreateSnapshotWindow::showEvent(QShowEvent* event) { void CreateSnapshotWindow::showEvent(QShowEvent* event) {
this->move(this->parentWidget()->window()->geometry().center() - this->rect().center()); this->move(this->parentWidget()->window()->geometry().center() - this->rect().center());
this->resetForm();
this->refreshForm(); this->refreshForm();
QWidget::showEvent(event); QWidget::showEvent(event);
} }
@@ -117,8 +120,6 @@ namespace Bloom::Widgets
void CreateSnapshotWindow::resetForm() { void CreateSnapshotWindow::resetForm() {
this->nameInput->setText("Untitled Snapshot"); this->nameInput->setText("Untitled Snapshot");
this->descriptionInput->setPlainText(""); this->descriptionInput->setPlainText("");
this->includeFocusedRegionsInput->setChecked(true);
this->captureDirectlyFromTargetInput->setChecked(false);
} }
void CreateSnapshotWindow::issueCaptureRequest() { void CreateSnapshotWindow::issueCaptureRequest() {
@@ -136,5 +137,6 @@ namespace Bloom::Widgets
); );
this->close(); this->close();
this->resetForm();
} }
} }