From: vsv Date: Fri, 23 May 2014 10:09:53 +0000 (+0400) Subject: Fix of delete feature operation X-Git-Tag: V_0.2~16^2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=76bbc8025e61fdde7ab396c9399852b2a1ae2f87;p=modules%2Fshaper.git Fix of delete feature operation --- diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index 9cbe795c7..d1ca2c2ed 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -117,7 +117,7 @@ void XGUI_DocumentDataModel::processEvent(const Events_Message* theMessage) } if (aPartModel) { QModelIndex aIndex = aPartModel->findGroup(aGroup); - int aStart = aPartModel->rowCount(aIndex) - 1; + int aStart = aPartModel->rowCount(aIndex); aIndex = createIndex(aIndex.row(), aIndex.column(), (void*)getModelIndex(aIndex)); removeRow(aStart, aIndex); } diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 44a2c7b3c..389f81420 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -825,7 +825,7 @@ void XGUI_Workshop::deleteFeatures(QFeatureList theList) aFeature = aObject->featureRef(); } } - aMgr->rootDocument()->removeFeature(aFeature); + aFeature->document()->removeFeature(aFeature); } aMgr->rootDocument()->finishOperation(); }