X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ObjectsBrowser.cpp;h=c43ca86fa984f2763438d973f0266923fb7f1d79;hb=65a616a3bb6cbdf09c61fed7eb91d1f5d9667988;hp=9a28b329208c5d66bc7ec04585e7a938791c164a;hpb=d9359acfaf1fa39e052d117c30af8a28e117b78d;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ObjectsBrowser.cpp b/src/XGUI/XGUI_ObjectsBrowser.cpp index 9a28b3292..c43ca86fa 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.cpp +++ b/src/XGUI/XGUI_ObjectsBrowser.cpp @@ -141,8 +141,6 @@ void XGUI_DataTree::onDoubleClick(const QModelIndex& theIndex) DocumentPtr aDoc = aMgr->activeDocument(); - QModelIndex aOldIndex = aModel->lastHistoryIndex(); - std::string aOpName = tr("History change").toStdString(); if (aObj.get()) { if (aObj->document() != aDoc) @@ -165,13 +163,10 @@ void XGUI_DataTree::onDoubleClick(const QModelIndex& theIndex) } QModelIndex aNewIndex = aModel->lastHistoryIndex(); QModelIndex aParent = theIndex.parent(); - int aStartRow = std::min(aOldIndex.row(), aNewIndex.row()); - int aEndRow = std::max(aOldIndex.row(), aNewIndex.row()); - for (int i = aStartRow; i <= aEndRow; i++) { + int aSize = aModel->rowCount(aParent); + for (int i = 0; i < aSize; i++) { update(aModel->index(i, 0, aParent)); } - update(aOldIndex); - update(aNewIndex); } //********************************************************************