Salome HOME
Issue #3069: Do not ask confirmation for operation closing if it doesn't produce... EDF_2019
authorvsv <vsv@opencascade.com>
Fri, 22 Nov 2019 13:02:17 +0000 (16:02 +0300)
committervsv <vsv@opencascade.com>
Fri, 22 Nov 2019 13:02:17 +0000 (16:02 +0300)
31 files changed:
src/Config/Config_FeatureMessage.cpp
src/Config/Config_FeatureMessage.h
src/Config/Config_FeatureReader.cpp
src/Config/Config_Keywords.h
src/Config/Config_WidgetAPI.h
src/ExchangePlugin/plugin-Exchange.xml
src/FeaturesPlugin/plugin-Features.xml
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_IPropertyPanel.cpp
src/ModuleBase/ModuleBase_IPropertyPanel.h
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_Operation.cpp
src/ModuleBase/ModuleBase_Operation.h
src/ModuleBase/ModuleBase_OperationAction.cpp [deleted file]
src/ModuleBase/ModuleBase_OperationAction.h [deleted file]
src/ModuleBase/ModuleBase_OperationFeature.cpp
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetDoubleValue.h
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/ModuleBase/ModuleBase_WidgetIntValue.h
src/ModuleBase/ModuleBase_WidgetLineEdit.cpp
src/ModuleBase/ModuleBase_WidgetLineEdit.h
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.h
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.h
src/PartSet/PartSet_MenuMgr.cpp
src/PartSet/PartSet_Module.cpp
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_Workshop.cpp

index 4728b95f8ea3beb98419f64cbbbc96bfa02e3620..e21246920295d4be1c18071bb24a803ed95f0daf 100644 (file)
@@ -41,6 +41,7 @@ Config_FeatureMessage::Config_FeatureMessage(const Events_ID theId, const void*
   myIsTitleInToolbar = true;
   myIsApplyContinue = false;
   myHideFacesPanel = false;
+  myAbortConfirmation = true;
 }
 
 Config_FeatureMessage::~Config_FeatureMessage()
@@ -250,3 +251,13 @@ void Config_FeatureMessage::setHideFacesPanel(bool theValue)
 {
   myHideFacesPanel = theValue;
 }
+
+bool Config_FeatureMessage::isAbortConfirmation() const
+{
+  return myAbortConfirmation;
+}
+
+void Config_FeatureMessage::setAbortConfirmation(bool theValue)
+{
+  myAbortConfirmation = theValue;
+}
index 89b7ada656742febd7fb5ef7cfbecf2112a1e721..8228256a8b065c06d50c19c2a565030bca14cb7a 100644 (file)
@@ -56,6 +56,7 @@ class Config_FeatureMessage : public Events_Message
   bool myIsAutoPreview; ///< Preview computation is performed automatically
   bool myIsTitleInToolbar; ///< False if title should not be displayed in the toolbar
   bool myHideFacesPanel; ///< Show or Hide HideFaces panel. By default is False
+  bool myAbortConfirmation; ///< Ask confirmation of abort of the feature from user
 
   /// True if the feature can have Apply/Continue button in its property panel
   bool myIsApplyContinue;
@@ -123,6 +124,7 @@ class Config_FeatureMessage : public Events_Message
   CONFIG_EXPORT bool isTitleInToolbar() const;
   /// If true - then HideFaces panel has to be shown
   CONFIG_EXPORT bool isHideFacesPanel() const;
+  CONFIG_EXPORT bool isAbortConfirmation() const;
 
   ///Set feature's Id
   CONFIG_EXPORT void setId(const std::string& id);
@@ -162,6 +164,8 @@ class Config_FeatureMessage : public Events_Message
   CONFIG_EXPORT void setTitleInToolbar(bool theValue);
   ///Set flag to display title in toolbar
   CONFIG_EXPORT void setHideFacesPanel(bool theValue);
+  ///Set flag to display title in toolbar
+  CONFIG_EXPORT void setAbortConfirmation(bool theValue);
   ///Set Apply/Continue state;
   ///If true - the feature can have Apply/Continue button in its property panel
   CONFIG_EXPORT void setApplyContinue(bool isModal);
index 512137c922ebf1ac78d0b5bbe4c188fd9976352f..7254b5577d4b6ef91f7369d3e4d493c001ba3ea8 100644 (file)
@@ -182,6 +182,9 @@ void Config_FeatureReader::fillFeature(xmlNodePtr theFeatureNode,
   bool isHideFaces = getBooleanAttribute(theFeatureNode, HIDEFACES_PANEL, false);
   outFeatureMessage->setHideFacesPanel(isHideFaces);
 
+  bool isConfirmAbort = getBooleanAttribute(theFeatureNode, ABORT_CONFIRMATION, true);
+  outFeatureMessage->setAbortConfirmation(isConfirmAbort);
+
   //if (isInternal) {
   //  //Internal feature has no visual representation.
   //  return;
index 70ca0db2ad5a71b82ced91739e2ad1a8efd04e74..21af73c077dca8b29da16d56eccd1079325b6cd9 100644 (file)
@@ -78,6 +78,7 @@ const static char* GROUP_TOOLBAR = "toolbar";
 const static char* FEATURE_ICON = "icon";
 const static char* FEATURE_TEXT = "title";
 const static char* HELP_FILE = "helpfile";
+const static char* ABORT_CONFIRMATION = "abort_confirmation";
 const static char* HIDEFACES_PANEL = "hidefaces_panel";
 const static char* FEATURE_KEYSEQUENCE = "keysequence";
 const static char* FEATURE_NESTED = "nested";
index 8f3a826af57d208f111fce64551b01e245b9e8db..055097cb7a2e9f1ea382950e340a0e451e489cee 100644 (file)
@@ -77,7 +77,6 @@ class Config_WidgetAPI
    */
   CONFIG_EXPORT bool getBooleanAttribute(const char* theAttributeName, bool theDefault) const;
 
- protected:
   /// These fields are accessible for ModuleBase_WidgetFactory only
   CONFIG_EXPORT Config_WidgetAPI(std::string theRawXml);
   //! Pass to the next (sibling) node of widget's xml definition. If impossible, returns false
index 8b8cd1a1d3bf3cea928b583a5fd025b706901a73..b2da9c048c13a88bf0b6d8cf40d3f5eef47a1f44 100644 (file)
@@ -12,7 +12,7 @@
         <source path="export_widget.xml" />
       </feature>
       <feature id="Dump" title="Dump" tooltip="Dump Python script" icon="icons/Exchange/dump.png"
-               helpfile="dumpFeature.html">
+               helpfile="dumpFeature.html" abort_confirmation="false">
         <export_file_selector id="file_path"
                               type="save"
                               title="Dump to file"
index 0fd56642c048dd5dd604aeb1227053bb1f36f90a..c902ef0048630747e9d2aa96985ea9b3f8d5c9ed 100644 (file)
     </group>
     <group id="Measurement">
       <feature id="Measurement" title="Measurement" tooltip="Calculate properties of objects"
-               icon="icons/Features/measurement.png" helpfile="measurementFeature.html">
+               icon="icons/Features/measurement.png" helpfile="measurementFeature.html" abort_confirmation="false">
         <source path="measurement_widget.xml"/>
       </feature>
     </group>
index 265c140f59b980355517c9a83635ba40e6a4ca59..37f13abdd1c07d710e6ac31a1ec80f62cef1b199 100644 (file)
@@ -55,7 +55,6 @@ SET(PROJECT_HEADERS
   ModuleBase_ListView.h
   ModuleBase_ModelWidget.h
   ModuleBase_Operation.h
-  ModuleBase_OperationAction.h
   ModuleBase_OperationDescription.h
   ModuleBase_OperationFeature.h
   ModuleBase_PageBase.h
@@ -125,7 +124,6 @@ SET(PROJECT_MOC_HEADERS
   ModuleBase_ModelDialogWidget.h
   ModuleBase_ModelWidget.h
   ModuleBase_Operation.h
-  ModuleBase_OperationAction.h
   ModuleBase_OperationFeature.h
   ModuleBase_PagedContainer.h
   ModuleBase_PageGroupBox.h
@@ -182,7 +180,6 @@ SET(PROJECT_SOURCES
   ModuleBase_ListView.cpp
   ModuleBase_ModelWidget.cpp
   ModuleBase_Operation.cpp
-  ModuleBase_OperationAction.cpp
   ModuleBase_OperationDescription.cpp
   ModuleBase_OperationFeature.cpp
   ModuleBase_PageBase.cpp
index df66658a7e0b9f5c5a0eafbeb45e87acaf630745..cd8b25c401d5ac5bf1537b5e3b4aed2fe1632f59 100644 (file)
@@ -78,3 +78,14 @@ ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget
   }
   return aFirstWidget;
 }
+
+bool ModuleBase_IPropertyPanel::isModified() const
+{
+  bool isModified = false;
+  QList<ModuleBase_ModelWidget*> aWidgets = modelWidgets();
+  foreach(ModuleBase_ModelWidget* aWgt, aWidgets) {
+    bool aRes = aWgt->isModified();
+    isModified |= aRes;
+  }
+  return isModified;
+}
index a4f954ea03ad8688b67556100c6d32cce1cff50c..16fdecf13b7a38ca9054e2e1e0c986bbf6f28346 100644 (file)
@@ -88,6 +88,9 @@ public:
   /// The method is called on accepting of operation
   virtual void onAcceptData() = 0;
 
+  /// Returns True if data of its feature was modified during operation
+  virtual bool isModified() const;
+
   /// Returns the first widget, where canAcceptFocus returns true
   /// \return a widget or null
   static ModuleBase_ModelWidget* findFirstAcceptingValueWidget(
index 3d667f6f19c19f72f2a9c0e9224d94b906908434..e29e8856b1615a8a8905d8d841aa6bf9fc67e459 100644 (file)
@@ -310,6 +310,9 @@ Q_OBJECT
   /// for current feature. By default does nothing
   virtual void showInformativePage() {}
 
+  /// Returns True if data of its attribute was modified
+  virtual bool isModified() const { return false; }
+
 signals:
   /// The signal about widget values are to be changed
   void beforeValuesChanged();
index 3055865095ba713812211ba3a28ee2a5289516fc..81da1e47d898882b53af79b8c3b81823a346074e 100644 (file)
@@ -40,6 +40,8 @@
 #include <GeomAPI_Pnt2d.h>
 
 #include <Events_Loop.h>
+#include <Config_WidgetAPI.h>
+#include <Config_Keywords.h>
 
 #include <QTimer>
 
@@ -177,3 +179,17 @@ bool ModuleBase_Operation::isGranted(QString theId) const
 {
   return myGrantedIds.contains(theId);
 }
+
+bool  ModuleBase_Operation::isModified() const
+{
+  if (myDescription->hasXmlRepresentation()) {
+    Config_WidgetAPI aWidgetApi(myDescription->xmlRepresentation().toStdString());
+    if (!aWidgetApi.getBooleanAttribute(ABORT_CONFIRMATION, true))
+      return false;
+  }
+  //if (myPropertyPanel)
+  //  return myPropertyPanel->isModified();
+  //return false;
+  // Most of operation causes creation of a feature
+  return true;
+}
index ecc4c7c079de77230bd43f08be0efa3fbb05bb8b..6ce75a83968fd4db49f5d5756f891aa7f9198dae 100644 (file)
@@ -80,10 +80,7 @@ Q_OBJECT
   virtual bool isGranted(QString theId) const;
 
   /// Returns True if data of its feature was modified during operation
-  virtual bool isModified() const { return myIsModified; }
-
-  /// Change the modified state of the operation
-  void setIsModified(const bool theIsModified) { myIsModified = theIsModified;  }
+  virtual bool isModified() const;
 
   /// Returns operations Id from it's description
   QString id() const;
diff --git a/src/ModuleBase/ModuleBase_OperationAction.cpp b/src/ModuleBase/ModuleBase_OperationAction.cpp
deleted file mode 100644 (file)
index c55c693..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include "ModuleBase_OperationAction.h"
-
-ModuleBase_OperationAction::ModuleBase_OperationAction(const QString& theId, QObject* theParent)
- : ModuleBase_Operation(theId, theParent)
-{
-}
-
-ModuleBase_OperationAction::~ModuleBase_OperationAction()
-{
-}
-
-bool ModuleBase_OperationAction::commit()
-{
-  // the action is supposed to perform a single modification,
-  // so the operation returns modified state
-  setIsModified(true);
-
-  return ModuleBase_Operation::commit();
-}
diff --git a/src/ModuleBase/ModuleBase_OperationAction.h b/src/ModuleBase/ModuleBase_OperationAction.h
deleted file mode 100644 (file)
index 35b9acf..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef ModuleBase_OperationAction_H
-#define ModuleBase_OperationAction_H
-
-#include <ModuleBase.h>
-
-#include <ModuleBase_Operation.h>
-
-/*!
- * \class ModuleBase_OperationAction
- * \ingroup GUI
- * \brief Base class for action operations
- *
- *  This is an action-like operation, which modifies the structure of data through
- *  starting/comitting transactions in the document. This operations are single stepped,
- *  and have no filled property panel, like Delete/Detach.
- */
-
-class MODULEBASE_EXPORT ModuleBase_OperationAction : public ModuleBase_Operation
-{
-Q_OBJECT
-
- public:
-  /// Constructor
-  /// \param theId the operation identifier
-  /// \param theParent the QObject parent
-  ModuleBase_OperationAction(const QString& theId = "", QObject* theParent = 0);
-  /// Destructor
-  virtual ~ModuleBase_OperationAction();
-
- public slots:
-  /// Commits the operation. Change is modified state to true value.
-  /// \return the result of commit
-  virtual bool commit();
-};
-
-#endif
index aa2d464fcb4fda8c66cf1f089b413a279ec4cdc2..98cbc74403f48ac321af785e2d41a49786e1d947 100644 (file)
@@ -175,22 +175,6 @@ FeaturePtr ModuleBase_OperationFeature::createFeature(const bool theFlushMessage
     std::shared_ptr<ModelAPI_Document> aDoc = ModelAPI_Session::get()->activeDocument();
     myFeature = aDoc->addFeature(getDescription()->operationId().toStdString());
   }
-  if (myFeature) {  // TODO: generate an error if feature was not created
-    setIsModified(true);
-    // Model update should call "execute" of a feature.
-    //myFeature->execute();
-    // Init default values
-    /*QList<ModuleBase_ModelWidget*> aWidgets = getDescription()->modelWidgets();
-     QList<ModuleBase_ModelWidget*>::const_iterator anIt = aWidgets.begin(), aLast = aWidgets.end();
-     for (; anIt != aLast; anIt++) {
-     (*anIt)->storeValue(aFeature);
-     }*/
-  }
-
-  //if (theFlushMessage) {
-  //  Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
-  //  Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
-  //}
   return myFeature;
 }
 
@@ -249,7 +233,6 @@ bool ModuleBase_OperationFeature::start()
 #ifdef DEBUG_OPERATION_START
   qDebug("ModuleBase_OperationFeature::start -- begin");
 #endif
-  setIsModified(false);
   QString anId = getDescription()->operationId();
   if (myIsEditing) {
     anId = anId.append(EditSuffix());
index 54cc1d3ce5397a74eed863845a6cf02472a029ff..c07a5f4b1d3cae63aeb73ab3a83149f2f7e8b95c 100644 (file)
@@ -230,3 +230,18 @@ bool ModuleBase_WidgetDoubleValue::processEnter()
   }
   return isModified;
 }
+
+bool ModuleBase_WidgetDoubleValue::isModified() const
+{
+  QString aText = mySpinBox->text();
+  if (aText.isEmpty())
+    return false;
+
+  if (myHasDefault) {
+    bool aOk = false;
+    double aVal = aText.toDouble(&aOk);
+    if (!aOk || aVal == myDefaultVal)
+      return false;
+  }
+  return true;
+}
\ No newline at end of file
index 4854ffe7a89934b68c714eb7b2f5c9bbacd3eb71..db658ac8b2f2a2fc577335e80f0331b7d5c47bb5 100644 (file)
@@ -58,6 +58,9 @@ Q_OBJECT
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
 
+  /// Returns True if data of its feature was modified during operation
+  virtual bool isModified() const;
+
  public slots:
  // Delayed value chnged: when user starts typing something,
  // it gives him a 0,5 second to finish typing, when sends valueChnaged() signal
index 0e131bb1dc8dda8766947714177e795ea9a01e38..25bee53c85eab9488cf97a00f375db621d342d29 100644 (file)
@@ -230,3 +230,18 @@ bool ModuleBase_WidgetIntValue::processEnter()
   }
   return isModified;
 }
+
+bool ModuleBase_WidgetIntValue::isModified() const
+{
+  QString aText = mySpinBox->text();
+  if (aText.isEmpty())
+    return false;
+
+  if (myHasDefault) {
+    bool aOk = false;
+    int aVal = aText.toInt(&aOk);
+    if (!aOk || aVal == myDefVal)
+      return false;
+  }
+  return true;
+}
\ No newline at end of file
index 7fb7d13f487663b4c6f369ca6c3bd024e4ff33d6..955e3aa973fd7fabc19bf3b0e5569783e0e3fdef 100644 (file)
@@ -58,6 +58,9 @@ Q_OBJECT
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
 
+  /// Returns True if data of its feature was modified during operation
+  virtual bool isModified() const;
+
 protected:
   /// Returns true if the event is processed.
   virtual bool processEnter();
index e915477ed7948f52023ec495ecf4cefc000e2f11..f5429cc3f24228d888ce7c8a5dd15178b2295f12 100644 (file)
@@ -160,3 +160,8 @@ bool ModuleBase_WidgetLineEdit::processEnter()
   }
   return isModified;
 }
+
+bool ModuleBase_WidgetLineEdit::isModified() const
+{
+  return !myLineEdit->text().isEmpty();
+}
\ No newline at end of file
index 05d6b1ed577d76469d61f67f42e0d4b29e27776c..c1622c4aa53ddbdadbfc900aef0755541d53ec10 100644 (file)
@@ -51,6 +51,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetLineEdit : public ModuleBase_ModelWidge
   /// Redefinition of virtual method
   virtual QList<QWidget*> getControls() const;
 
+  /// Returns True if data of its feature was modified during operation
+  virtual bool isModified() const;
+
 protected:
   /// Returns true if the event is processed.
   virtual bool processEnter();
index 337aa8acf4a4e246ccb969bfc5470dd4057de76f..4897b5704953d796347f64dae0301565b58fcb6a 100644 (file)
@@ -1180,3 +1180,8 @@ void ModuleBase_WidgetMultiSelector::onShowOnly(bool theChecked)
   } else
     Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
 }
+
+bool ModuleBase_WidgetMultiSelector::isModified() const
+{
+  return myListView->getControl()->count() > 0;
+}
\ No newline at end of file
index f34e18ef568e40ffacf0ad776ebf6a952e3d7111..08aa13a39934db9b5cfa04a447d812df8de86790 100644 (file)
@@ -115,6 +115,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge
   /// The slot is called when user press Ok or OkPlus buttons in the parent property panel
   virtual void onFeatureAccepted();
 
+  /// Returns True if data of its feature was modified during operation
+  virtual bool isModified() const;
+
 public slots:
   /// Slot is called on selection type changed
   void onSelectionTypeChanged();
index c8d37d5d3ad3678481d40d680f07996d394746e6..127c7621e4f846c5ca09a4a4b6ff784c702d133e 100644 (file)
@@ -238,3 +238,9 @@ void ModuleBase_WidgetShapeSelector::updateSelectionName()
     }
   }
 }
+
+//********************************************************************
+bool ModuleBase_WidgetShapeSelector::isModified() const
+{
+  return !myTextLine->text().isEmpty();
+}
\ No newline at end of file
index 61b51810d7195af48e38ede379e287e989658e27..916259660ec8d89f567c95dcc3cc55d064363cbc 100644 (file)
@@ -94,6 +94,9 @@ Q_OBJECT
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
 
+  /// Returns True if data of its feature was modified during operation
+  virtual bool isModified() const;
+
  protected:
   /// Saves the internal parameters to the given feature
   /// \return True in success
index 06ebaefa6e65416f6446c1cf7f57f9cc7b581cd6..e458403a25cd312e909c82eafad0b11b89204316 100644 (file)
@@ -35,7 +35,6 @@
 
 #include <ModuleBase_ISelection.h>
 #include <ModuleBase_Operation.h>
-#include <ModuleBase_OperationAction.h>
 #include <ModuleBase_OperationFeature.h>
 #include <ModuleBase_ViewerPrs.h>
 #include <ModuleBase_Tools.h>
@@ -313,8 +312,8 @@ void PartSet_MenuMgr::onLineDetach(QAction* theAction)
     XGUI_Workshop* aWorkshop = aConnector->workshop();
     ModuleBase_Operation* anOperation = myModule->workshop()->currentOperation();
 
-    ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(
-                                   tr("Detach %1").arg(aLine->data()->name().c_str()), myModule);
+    ModuleBase_Operation* anOpAction =
+      new ModuleBase_Operation(tr("Detach %1").arg(aLine->data()->name().c_str()), myModule);
     bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation);
     XGUI_OperationMgr* anOpMgr = aConnector->workshop()->operationMgr();
     // the active nested sketch operation should be aborted unconditionally
@@ -373,11 +372,11 @@ void PartSet_MenuMgr::setAuxiliary(const bool isChecked)
 
   QAction* anAction = action("AUXILIARY_CMD");
   //SessionPtr aMgr = ModelAPI_Session::get();
-  ModuleBase_OperationAction* anOpAction = 0;
+  ModuleBase_Operation* anOpAction = 0;
   XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(myModule->workshop());
   XGUI_OperationMgr* anOpMgr = aConnector->workshop()->operationMgr();
   if (isUseTransaction) {
-    anOpAction = new ModuleBase_OperationAction(anAction->text(), myModule);
+    anOpAction = new ModuleBase_Operation(anAction->text(), myModule);
     bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(anOperation);
 
     bool isCommitted;
index cc7c8b7f8e478618d6eaf539ba675bae91f5cffd..0def06c60408839ca7c93c7bad46e962ec1aa0c9 100644 (file)
@@ -54,7 +54,6 @@
 #include <SketchPlugin_ConstraintCoincidence.h>
 
 #include <ModuleBase_Operation.h>
-#include <ModuleBase_OperationAction.h>
 #include <ModuleBase_IViewer.h>
 #include <ModuleBase_IViewWindow.h>
 #include <ModuleBase_IPropertyPanel.h>
@@ -968,7 +967,7 @@ bool PartSet_Module::deleteObjects()
 
     // 3. start operation
     QString aDescription = aWorkshop->contextMenuMgr()->action("DELETE_CMD")->text();
-    ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, this);
+    ModuleBase_Operation* anOpAction = new ModuleBase_Operation(aDescription, this);
 
     // the active nested sketch operation should be aborted unconditionally
     // the Delete action should be additionally granted for the Sketch operation
index 00cf24153ffbe8d7edd5e460e3d74bbe0ab5b0de..60db4013ccbd13c7982158734a7c1c0743faff2f 100644 (file)
@@ -55,7 +55,7 @@
 
 #include <ModuleBase_IModule.h>
 #include <ModuleBase_Tools.h>
-#include <ModuleBase_OperationAction.h>
+#include <ModuleBase_Operation.h>
 #include <ModuleBase_ViewerPrs.h>
 
 #include <QAction>
index f159dd4b5f4bc086dd509b611c3911148626e51b..b8857fecfe6ab87fc9f6abd40c19efa177afd71f 100644 (file)
@@ -628,8 +628,8 @@ void XGUI_OperationMgr::onOperationStopped()
     }
   }
   if (aResultOp) {
-    bool isModified = aCurrentOperation->isModified();
-    aResultOp->setIsModified(aResultOp->isModified() || isModified);
+    //bool isModified = aCurrentOperation->isModified();
+    //aResultOp->setIsModified(aResultOp->isModified() || isModified);
     resumeOperation(aResultOp);
     onValidateOperation();
   }
index 9b7166a14df26695104eb4fedfe912addc6da3fd..b00a040be13b82bdd46039eb58c7e472e29b7d38 100644 (file)
 #include <ModuleBase_Tools.h>
 #include <ModuleBase_WidgetFactory.h>
 #include <ModuleBase_OperationFeature.h>
-#include <ModuleBase_OperationAction.h>
 #include <ModuleBase_PagedContainer.h>
 #include <ModuleBase_WidgetValidated.h>
 #include <ModuleBase_ModelWidget.h>
@@ -1924,7 +1923,7 @@ void XGUI_Workshop::deleteObjects()
   bool aDone = false;
   QString aDescription = contextMenuMgr()->action("DELETE_CMD")->text() + " %1";
   aDescription = aDescription.arg(XGUI_Tools::unionOfObjectNames(anObjects, ", "));
-  ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, module());
+  ModuleBase_Operation* anOpAction = new ModuleBase_Operation(aDescription, module());
 
   operationMgr()->startOperation(anOpAction);
 
@@ -2081,7 +2080,7 @@ void XGUI_Workshop::cleanHistory()
     // 1. start operation
     aDescription += "by deleting of " +
       aDescription.arg(XGUI_Tools::unionOfObjectNames(anObjects, ", "));
-    ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, module());
+    ModuleBase_Operation* anOpAction = new ModuleBase_Operation(aDescription, module());
     operationMgr()->startOperation(anOpAction);
 
     // WORKAROUND, should be done before each object remove, if it presents in XGUI_DataModel tree