diff --git a/pywr_editor/dialogs/metadata/metadata_dialog.py b/pywr_editor/dialogs/metadata/metadata_dialog.py index 6268102..ecc9dcc 100644 --- a/pywr_editor/dialogs/metadata/metadata_dialog.py +++ b/pywr_editor/dialogs/metadata/metadata_dialog.py @@ -65,5 +65,5 @@ def on_form_save(self) -> None: Save the form and close the dialog. :return: None """ - self.form.on_save() - self.close() + if self.form.on_save(): + self.close() diff --git a/pywr_editor/dialogs/node/node_dialog.py b/pywr_editor/dialogs/node/node_dialog.py index 3f232da..0b37a98 100644 --- a/pywr_editor/dialogs/node/node_dialog.py +++ b/pywr_editor/dialogs/node/node_dialog.py @@ -75,8 +75,8 @@ def on_form_save(self) -> None: Save the form and close the dialog. :return: None """ - self.form.save() - self.close() + if self.form.save(): + self.close() class NodeDialogTitle(QWidget):