From dcc5c65a487bb9b354431ccdaf1e8b859f195bc5 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 30 Nov 2018 12:17:13 +0300 Subject: [PATCH] Fix for renaming: launch renaming only in column #1 --- src/XGUI/XGUI_ObjectsBrowser.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/XGUI/XGUI_ObjectsBrowser.cpp b/src/XGUI/XGUI_ObjectsBrowser.cpp index 7f28e6f41..1862244a5 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.cpp +++ b/src/XGUI/XGUI_ObjectsBrowser.cpp @@ -489,10 +489,12 @@ void XGUI_ObjectsBrowser::onEditItem() // Find index which corresponds the feature QModelIndex aIndex; foreach(QModelIndex aIdx, selectedIndexes()) { - ObjectPtr aFea = dataModel()->object(aIdx); - if (dataModel()->object(aIdx)->isSame(anObject)) { - aIndex = aIdx; - break; + if (aIdx.column() == 1) { + ObjectPtr aFea = dataModel()->object(aIdx); + if (dataModel()->object(aIdx)->isSame(anObject)) { + aIndex = aIdx; + break; + } } } if (aIndex.isValid()) { -- 2.39.2