From 92c20f4e2995af142a27f20b02648c46704f9a15 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 12 May 2014 11:16:38 +0400 Subject: [PATCH] Fix of crash on feature request. --- src/XGUI/XGUI_DocumentDataModel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); -- 2.39.2