]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Separation part of the function in an additional function. Preparation to create...
authornds <nds@opencascade.com>
Thu, 5 Nov 2015 04:32:05 +0000 (07:32 +0300)
committernds <nds@opencascade.com>
Thu, 5 Nov 2015 04:32:05 +0000 (07:32 +0300)
src/PartSet/PartSet_SketcherReetntrantMgr.cpp
src/PartSet/PartSet_SketcherReetntrantMgr.h

index 0bb3ce4de22e07e6fe1f020a7444a7d004e82029..b095ff9c4c13e2ea55f9aacc2bdc99bd97e1f1c0 100755 (executable)
@@ -242,21 +242,7 @@ void PartSet_SketcherReetntrantMgr::onBeforeStopped()
   if (!isActiveMgr() || !myIsInternalEditOperation)
     return;
 
-  ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
-                                                      (myWorkshop->currentOperation());
-  if (aFOperation) {
-    disconnect(aFOperation, SIGNAL(beforeCommitted()), this, SLOT(onBeforeStopped()));
-    disconnect(aFOperation, SIGNAL(beforeAborted()), this, SLOT(onBeforeStopped()));
-  }
-
-  PartSet_Module* aModule = module();
-  ModuleBase_ModelWidget* aFirstWidget = aModule->activeWidget();
-  ModuleBase_IPropertyPanel* aPanel = aModule->currentOperation()->propertyPanel();
-  if (aFirstWidget != aPanel->activeWidget()) {
-    ModuleBase_WidgetSelector* aWSelector = dynamic_cast<ModuleBase_WidgetSelector*>(aFirstWidget);
-    if (aWSelector)
-      aWSelector->activateSelectionAndFilters(false);
-  }
+  beforeStopInternalEdit();
 }
 
 bool PartSet_SketcherReetntrantMgr::canBeCommittedByPreselection()
@@ -316,6 +302,25 @@ void PartSet_SketcherReetntrantMgr::startInternalEdit(const std::string& thePrev
   }
 }
 
+void PartSet_SketcherReetntrantMgr::beforeStopInternalEdit()
+{
+  ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+                                                      (myWorkshop->currentOperation());
+  if (aFOperation) {
+    disconnect(aFOperation, SIGNAL(beforeCommitted()), this, SLOT(onBeforeStopped()));
+    disconnect(aFOperation, SIGNAL(beforeAborted()), this, SLOT(onBeforeStopped()));
+  }
+
+  PartSet_Module* aModule = module();
+  ModuleBase_ModelWidget* aFirstWidget = aModule->activeWidget();
+  ModuleBase_IPropertyPanel* aPanel = aModule->currentOperation()->propertyPanel();
+  if (aFirstWidget != aPanel->activeWidget()) {
+    ModuleBase_WidgetSelector* aWSelector = dynamic_cast<ModuleBase_WidgetSelector*>(aFirstWidget);
+    if (aWSelector)
+      aWSelector->activateSelectionAndFilters(false);
+  }
+}
+
 void PartSet_SketcherReetntrantMgr::restartOperation()
 {
   if (myIsInternalEditOperation) {
index c43796693b075b6322e3bbe44ff1c8963127cd8d..2bdeb8617b18635a05c104bd28e8baeb8b7045ac 100755 (executable)
@@ -122,6 +122,10 @@ private:
   /// \param thePreviousAttributeID an index of the previous attribute to set focus to this widget
   void startInternalEdit(const std::string& thePreviousAttributeID);
 
+  /// Disconnects this manager from operation signals, deactivate selection of the first control
+  /// in the viewer.
+  void beforeStopInternalEdit();
+
   /// Commits the current operation and launches a new with the commited operation feature index
   void restartOperation();