From: vsv Date: Mon, 2 Sep 2019 08:48:28 +0000 (+0300) Subject: Restore old transparency on cancel of transparency operation X-Git-Tag: VEDF2019Lot4~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f467647fbb683d5e516be024826d46f401dcc8e6;p=modules%2Fshaper.git Restore old transparency on cancel of transparency operation --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index a8bee3e64..520bd427c 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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);