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:
@@ -93,10 +93,7 @@ bool TaskDialog::canClose() const
|
||||
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||
msgBox.setDefaultButton(QMessageBox::Yes);
|
||||
int ret = msgBox.exec();
|
||||
if (ret == QMessageBox::Yes)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return (ret == QMessageBox::Yes);
|
||||
}
|
||||
|
||||
//==== calls from the TaskView ===============================================================
|
||||
@@ -116,6 +113,11 @@ void TaskDialog::autoClosedOnTransactionChange()
|
||||
|
||||
}
|
||||
|
||||
void TaskDialog::autoClosedOnDeletedDocument()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TaskDialog::clicked(int)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user