+bool XGUI_OperationMgr::canAbortOperation()
+{
+ ModuleBase_Operation* anOperation = currentOperation();
+ if (anOperation && anOperation->isModified()) {
+ int anAnswer = QMessageBox::question(qApp->activeWindow(), tr("Cancel operation"),
+ tr("Operation %1 will be cancelled. Continue?").arg(anOperation->id()),
+ QMessageBox::Yes, QMessageBox::No);
+ return anAnswer == QMessageBox::Yes;
+ }
+ return true;
+}
+