Salome HOME
Constraint: Check AIS dimension possibilities. Line edit appears by the text selectio...
[modules/shaper.git] / src / XGUI / XGUI_OperationMgr.cpp
index 3fb2cad89dce5d54dc9705829b0555b0fdc9adb3..514c5b2f116c1f760e975a7dbc1f86efb86bda20 100644 (file)
@@ -115,8 +115,12 @@ bool XGUI_OperationMgr::canStopOperation()
 void XGUI_OperationMgr::onCommitOperation()
 {
   ModuleBase_Operation* anOperation = currentOperation();
-  if (anOperation)
-    anOperation->commit();
+  if (anOperation) {
+    if (anOperation->canBeCommitted())
+      anOperation->commit();
+    else
+      anOperation->abort();
+  }
 }
 
 void XGUI_OperationMgr::onAbortOperation()