]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge remote-tracking branch 'remotes/origin/SketchSolver_Linux'
authorazv <azv@opencascade.com>
Thu, 22 May 2014 08:11:04 +0000 (12:11 +0400)
committerazv <azv@opencascade.com>
Thu, 22 May 2014 08:11:04 +0000 (12:11 +0400)
1  2 
src/XGUI/XGUI_Workshop.cpp

index a666a25a2b31ff6ec2e3abf87183609543768bde,d095b1cb4c35a3dfb97e05a8191b3a0f7a55b7d8..65450b189a2bc6bb7968684516f3ddc3ac732f41
@@@ -763,18 -763,9 +763,18 @@@ void XGUI_Workshop::deleteFeatures(QFea
                                                            tr("Seleted features will be deleted. Continue?"), 
                                                            QMessageBox::No | QMessageBox::Yes, QMessageBox::No);
    if (aRes == QMessageBox::Yes) {
 +    PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
 +    aMgr->rootDocument()->startOperation();
      foreach (FeaturePtr aFeature, theList) {
 -      DocumentPtr aDoc = aFeature->data()->docRef("PartDocument")->value();
 -      aDoc->removeFeature(aFeature);
 +      if (aFeature->getKind() == "Part") {
 +        DocumentPtr aDoc = aFeature->data()->docRef("PartDocument")->value();
 +        if (aDoc == aMgr->currentDocument()) {
 +          aDoc->close();
 +        }
 +      } //else
 +        //aDoc = aFeature->document();
 +      aMgr->rootDocument()->removeFeature(aFeature);
      }
 +    aMgr->rootDocument()->finishOperation();
    }
- }
+ }