]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix of crash on feature request.
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 12 May 2014 07:16:38 +0000 (11:16 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 12 May 2014 07:16:38 +0000 (11:16 +0400)
src/XGUI/XGUI_DocumentDataModel.cpp

index e1d4aee48882c96744264646633499a0e1896267..079986bc5134d7e36d7850132776ee27a9639101 100644 (file)
@@ -322,7 +322,10 @@ FeaturePtr XGUI_DocumentDataModel::feature(const QModelIndex& theIndex) const
 {
   if (theIndex.internalId() == PartsFolder)
     return FeaturePtr();
-
+  if (theIndex.internalId() == HistoryNode) {
+      int aOffset = historyOffset();
+      return myDocument->feature(FEATURES_GROUP, theIndex.row() - aOffset);
+  }
   QModelIndex aIndex = toSourceModelIndex(theIndex);
   if (!isSubModel(aIndex.model())) 
     return FeaturePtr();