X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_DataModel.cpp;h=344b4bfc3db37a3ae58d7686fc1c2129a6c68472;hb=d9359acfaf1fa39e052d117c30af8a28e117b78d;hp=2f0672cfed88af78786113cd44f436d56ca9dd69;hpb=dd49636265af78543a695ce25d16c014ae43a2fd;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_DataModel.cpp b/src/XGUI/XGUI_DataModel.cpp index 2f0672cfe..344b4bfc3 100644 --- a/src/XGUI/XGUI_DataModel.cpp +++ b/src/XGUI/XGUI_DataModel.cpp @@ -644,6 +644,9 @@ Qt::ItemFlags XGUI_DataModel::flags(const QModelIndex& theIndex) const aObj = (ModelAPI_Object*) theIndex.internalPointer(); } if (aObj) { + if (aObj->isDisabled()) + return Qt::ItemFlags(); + bool isCompositeSub = false; if (theIndex.column() == 1) { ObjectPtr aObjPtr = aObj->data()->owner(); @@ -664,12 +667,9 @@ Qt::ItemFlags XGUI_DataModel::flags(const QModelIndex& theIndex) const // An object which is sub-object of a composite object can not be accessible in column 1 if (isCompositeSub) return Qt::ItemFlags(); + } - aFlags |= Qt::ItemIsEditable; - if (!aObj->isDisabled()) - aFlags |= Qt::ItemIsEnabled; - } else - aFlags |= Qt::ItemIsEnabled; + aFlags |= Qt::ItemIsEnabled; return aFlags; }