From b086551e5a4cdd28c5477abf168b7ec7ef433327 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 5 Sep 2018 18:05:47 +0300 Subject: [PATCH] Show "not loaded" suffix for names of not loaded parts --- src/PartSet/PartSet_TreeNodes.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/PartSet/PartSet_TreeNodes.cpp b/src/PartSet/PartSet_TreeNodes.cpp index 81b3fec0f..771e0f42e 100644 --- a/src/PartSet/PartSet_TreeNodes.cpp +++ b/src/PartSet/PartSet_TreeNodes.cpp @@ -899,7 +899,14 @@ QVariant PartSet_PartRootNode::data(int theColumn, int theRole) const case 1: switch (theRole) { case Qt::DisplayRole: + { + ResultPartPtr aPartRes = getPartResult(myObject); + if (aPartRes.get()) { + if (aPartRes->partDoc().get() == NULL) + return QString(myObject->data()->name().c_str()) + " (Not loaded)"; + } return QString(myObject->data()->name().c_str()); + } case Qt::DecorationRole: return ModuleBase_IconFactory::get()->getIcon(myObject); } -- 2.39.2