Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not change history in ObjectBrowser if an operation is opened
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_DataModel.cpp
diff --git
a/src/XGUI/XGUI_DataModel.cpp
b/src/XGUI/XGUI_DataModel.cpp
index 2f0672cfed88af78786113cd44f436d56ca9dd69..344b4bfc3db37a3ae58d7686fc1c2129a6c68472 100644
(file)
--- 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) {
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();
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();
// 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;
}
return aFlags;
}