]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix of delete feature operation
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 23 May 2014 10:09:53 +0000 (14:09 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 23 May 2014 10:09:53 +0000 (14:09 +0400)
src/XGUI/XGUI_DocumentDataModel.cpp
src/XGUI/XGUI_Workshop.cpp

index 9cbe795c7682a9e3f98c0431986e86cc194d5180..d1ca2c2ed4b895c46237f14eeb63322c674fe33b 100644 (file)
@@ -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);
         }
index 44a2c7b3cacec0e92ce5c1591cce3612e97351c5..389f81420925586f6724787be794a2a9e1a964bb 100644 (file)
@@ -825,7 +825,7 @@ void XGUI_Workshop::deleteFeatures(QFeatureList theList)
           aFeature = aObject->featureRef();
         }
       }
-      aMgr->rootDocument()->removeFeature(aFeature);
+      aFeature->document()->removeFeature(aFeature);
     }
     aMgr->rootDocument()->finishOperation();
   }