From: azv Date: Thu, 22 May 2014 08:11:04 +0000 (+0400) Subject: Merge remote-tracking branch 'remotes/origin/SketchSolver_Linux' X-Git-Tag: V_0.2~29^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0b636ffd42324731b8dba44ad3b9ace84a8c5d4f;p=modules%2Fshaper.git Merge remote-tracking branch 'remotes/origin/SketchSolver_Linux' --- 0b636ffd42324731b8dba44ad3b9ace84a8c5d4f diff --cc src/XGUI/XGUI_Workshop.cpp index a666a25a2,d095b1cb4..65450b189 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@@ -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(); } - } + }