]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Restore old transparency on cancel of transparency operation
authorvsv <vsv@opencascade.com>
Mon, 2 Sep 2019 08:48:28 +0000 (11:48 +0300)
committervsv <vsv@opencascade.com>
Mon, 2 Sep 2019 08:48:28 +0000 (11:48 +0300)
src/XGUI/XGUI_Workshop.cpp

index a8bee3e641755fe8bbd902f7289ca20d5c11253b..520bd427c249f4329e1ec026a209900a196cee56 100644 (file)
@@ -2460,9 +2460,11 @@ void XGUI_Workshop::changeTransparency(const QObjectPtrList& theObjects)
   QString aDescription = contextMenuMgr()->action("TRANSPARENCY_CMD")->text();
   aMgr->startOperation(aDescription.toStdString());
 
-  if (aDlg->exec() != QDialog::Accepted)
+  if (aDlg->exec() != QDialog::Accepted) {
+    aMgr->abortOperation();
+    Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
     return;
-
+  }
   // 4. set the value to all results
   aCurrentValue = aTransparencyWidget->getValue();
   setTransparency(aCurrentValue, theObjects);