From: vsv Date: Mon, 12 May 2014 07:16:38 +0000 (+0400) Subject: Fix of crash on feature request. X-Git-Tag: V_0.2~76 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=92c20f4e2995af142a27f20b02648c46704f9a15;p=modules%2Fshaper.git Fix of crash on feature request. --- diff --git a/src/XGUI/XGUI_DocumentDataModel.cpp b/src/XGUI/XGUI_DocumentDataModel.cpp index e1d4aee48..079986bc5 100644 --- a/src/XGUI/XGUI_DocumentDataModel.cpp +++ b/src/XGUI/XGUI_DocumentDataModel.cpp @@ -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();