From: vsv Date: Mon, 20 Jul 2020 11:20:23 +0000 (+0300) Subject: Issue #3221: Set gray color for disabled features X-Git-Tag: V9_6_0a1~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=caaf007a6afa409be5b474cbe8b4569c93fe0a70;p=modules%2Fshaper.git Issue #3221: Set gray color for disabled features --- diff --git a/src/PartSet/PartSet_TreeNodes.cpp b/src/PartSet/PartSet_TreeNodes.cpp index 114eea0a5..3bbc61c49 100644 --- a/src/PartSet/PartSet_TreeNodes.cpp +++ b/src/PartSet/PartSet_TreeNodes.cpp @@ -133,6 +133,8 @@ QVariant PartSet_ObjectNode::data(int theColumn, int theRole) const } case Qt::ForegroundRole: if (myObject->groupName() == ModelAPI_Feature::group()) { + if (myObject->isDisabled()) + return PartSet_TreeNode::data(theColumn, theRole); std::vector aColor = Config_PropManager::color("Visualization", "feature_objectbrowser_color"); return QColor(aColor[0], aColor[1], aColor[2]); @@ -1211,9 +1213,11 @@ QTreeNodesList PartSet_ObjectFolderNode::objectsDeleted(const DocumentPtr& /*the QVariant PartSet_ObjectFolderNode::data(int theColumn, int theRole) const { if (theRole == Qt::ForegroundRole) { - std::vector aColor = - Config_PropManager::color("Visualization", "feature_objectbrowser_color"); - return QColor(aColor[0], aColor[1], aColor[2]); + if (!myObject->isDisabled()) { + std::vector aColor = + Config_PropManager::color("Visualization", "feature_objectbrowser_color"); + return QColor(aColor[0], aColor[1], aColor[2]); + } } return PartSet_ObjectNode::data(theColumn, theRole);