Gui: Extend TaskDialog

* Add TaskDialog::autoClosedOnDeletedDocument()
* Add option to automatically close task dialog when document is deleted
* Expose autoClosedOnDeletedDocument() to Python
* Expose autoClosedOnTransactionChange() to Python
* Change ControlPy::showDialog() to directly return the task dialog wrapper
* Change TaskView::slotDeletedDocument() to close task dialog if requested
This commit is contained in:
wmayer
2024-07-02 14:18:18 +02:00
committed by wwmayer
parent af1f7385d4
commit 3f49779dae
6 changed files with 135 additions and 27 deletions

View File

@@ -99,8 +99,11 @@ public:
/// active transaction.
Py::Object setAutoCloseOnTransactionChange(const Py::Tuple&);
Py::Object isAutoCloseOnTransactionChange(const Py::Tuple&);
Py::Object setAutoCloseOnDeletedDocument(const Py::Tuple&);
Py::Object isAutoCloseOnDeletedDocument(const Py::Tuple&);
Py::Object getDocumentName(const Py::Tuple&);
Py::Object setDocumentName(const Py::Tuple&);
/*!
Indicates whether this task dialog allows other commands to modify
@@ -160,6 +163,9 @@ public:
bool isAllowedAlterSelection() const override;
bool needsFullSpace() const override;
void autoClosedOnTransactionChange() override;
void autoClosedOnDeletedDocument() override;
public:
/// is called by the framework when the dialog is opened
void open() override;