Salome HOME
Issue #2538: Use a title of an operation instead of its Id
authorvsv <vsv@opencascade.com>
Wed, 4 Jul 2018 09:59:53 +0000 (12:59 +0300)
committervsv <vsv@opencascade.com>
Wed, 4 Jul 2018 09:59:53 +0000 (12:59 +0300)
src/XGUI/XGUI_OperationMgr.cpp

index 03b605612cc9598d1151072593bde33a14289d7a..1110d1b8d9bfefdf774a7a27d713328e3be88db5 100644 (file)
@@ -343,15 +343,16 @@ bool XGUI_OperationMgr::canStopOperation(ModuleBase_Operation* theOperation,
   if (isGrantedOperation(theOperation->id()))
     return true;
   if (theOperation && theOperation->isModified()) {
+    QString aTitle = theOperation->getDescription()->description();
     if (theMessageKind == XGUI_AbortOperationMessage) {
-      QString aMessage = tr("%1 operation will be aborted.").arg(theOperation->id());
+      QString aMessage = tr("%1 operation will be aborted.").arg(aTitle);
       myActiveMessageBox = createMessageBox(aMessage);
       bool aResult = myActiveMessageBox->exec() == QMessageBox::Ok;
       myActiveMessageBox = 0;
       return aResult;
     }
     else if (theMessageKind == XGUI_InformationMessage) {
-      QString aMessage = tr("Please validate your %1 before saving.").arg(theOperation->id());
+      QString aMessage = tr("Please validate your %1 before saving.").arg(aTitle);
       myActiveMessageBox = createInformationBox(aMessage);
       myActiveMessageBox->exec();
       myActiveMessageBox = 0;