]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1514: Disable all items in non-active part document
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 30 May 2016 09:37:56 +0000 (12:37 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 30 May 2016 09:38:11 +0000 (12:38 +0300)
src/XGUI/XGUI_DataModel.cpp

index d1ccd46ffa3f987c4729acb3a77d00b5868c7eed..44030e86a99553f038e47f2ca175db5d6dac9662 100644 (file)
@@ -727,6 +727,10 @@ Qt::ItemFlags XGUI_DataModel::flags(const QModelIndex& theIndex) const
     // An object
     if (aObj->isDisabled()) 
       return theIndex.column() == 1? Qt::ItemIsSelectable : aNullFlag;
+
+    if (aSession->moduleDocument() != aObj->document())
+      if (aActiveDoc != aObj->document())
+        return theIndex.column() == 1? Qt::ItemIsSelectable : aNullFlag;
     
     bool isCompositeSub = false;
     // An object which is sub-object of a composite object can not be accessible in column 1