Salome HOME
Merge branch 'BR_ADVANCED_CURRENT_FEATURE_MANAGEMENT' of salome:modules/shaper into...
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 9 Oct 2015 08:39:37 +0000 (11:39 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 9 Oct 2015 08:39:37 +0000 (11:39 +0300)
Conflicts:
src/ModuleBase/ModuleBase_OperationFeature.cpp

1  2 
src/ModuleBase/ModuleBase_OperationFeature.cpp

index 93c5b60293076dffead97511a7699b16dfa76a70,647455f46bed1265f2010644957ae102a3ee6a4e..97388529154b9daeb80fc0da22bc1e3d7e1b9b62
@@@ -206,23 -196,7 +197,7 @@@ void ModuleBase_OperationFeature::start
        return;
      }
    }
-   /// Set current feature and remeber old current feature
-   if (myIsEditing) {
-     SessionPtr aMgr = ModelAPI_Session::get();
-     DocumentPtr aDoc = aMgr->activeDocument();
-     // the parameter of current feature should be false, we should use all feature, not only visible
-     // in order to correctly save the previous feature of the nested operation, where the
-     // features can be not visible in the tree. The problem case is Edit sketch entitity(line)
-     // in the Sketch, created in ExtrusionCut operation. The entity disappears by commit.
-     // When sketch entity operation started, the sketch should be cashed here as the current.
-     // Otherwise(the flag is true), the ExtrusionCut is cashed, when commit happens, the sketch
-     // is disabled, sketch entity is disabled as extrusion cut is created earliest then sketch.
-     // As a result the sketch disappears from the viewer. However after commit it is displayed back.
-     myPreviousCurrentFeature = aDoc->currentFeature(false);
-     aDoc->setCurrentFeature(feature(), false);
-   }
 -  startOperation();
 +  //Already called startOperation();
    emit started();
  
  }
@@@ -244,23 -220,10 +221,12 @@@ void ModuleBase_OperationFeature::abort
    if (aPropertyPanel)
      aPropertyPanel->cleanContent();
  
-   SessionPtr aMgr = ModelAPI_Session::get();
-   if (myIsEditing) {
-     DocumentPtr aDoc = aMgr->activeDocument();
-     bool aIsOp = aMgr->isOperation();
-     if (!aIsOp)
-       aMgr->startOperation();
-     aDoc->setCurrentFeature(myPreviousCurrentFeature, false);//true);
-     if (!aIsOp)
-       aMgr->finishOperation();
-     myPreviousCurrentFeature = FeaturePtr();
-   }
 +  myFeature->setStable(true);
 +
    abortOperation();
    stopOperation();
  
+   SessionPtr aMgr = ModelAPI_Session::get();
    aMgr->abortOperation();
    emit stopped();
    // the viewer update should be unblocked in order to avoid the features blinking before they are