Skip to content
Permalink
Browse files

by default show highlighted object in bold text, a document's active …

…object is not in bold text any more
  • Loading branch information...
wwmayer committed Sep 10, 2018
1 parent 3b9a9e0 commit 34a0c7bce2acc8b5b5c3042fd7bb50633df28069
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/Gui/Tree.cpp
@@ -1254,6 +1254,7 @@ void DocumentItem::slotRenameObject(const Gui::ViewProviderDocumentObject& obj)

void DocumentItem::slotActiveObject(const Gui::ViewProviderDocumentObject& obj)
{
#if 0
std::string objectName = obj.getObject()->getNameInDocument();
if (ObjectMap.find(objectName) == ObjectMap.end())
return; // signal is emitted before the item gets created
@@ -1265,6 +1266,9 @@ void DocumentItem::slotActiveObject(const Gui::ViewProviderDocumentObject& obj)
item->setFont(0,f);
}
}
#else
Q_UNUSED(obj);
#endif
}

void DocumentItem::slotHighlightObject (const Gui::ViewProviderDocumentObject& obj, const Gui::HighlightMode& high, bool set)
@@ -1302,9 +1306,11 @@ void DocumentItem::slotHighlightObject (const Gui::ViewProviderDocumentObject& o
QColor color(230,230,255);
if (set) {
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/TreeView");
bool bold = hGrp->GetBool("TreeActiveBold",true);
bool italic = hGrp->GetBool("TreeActiveItalic",false);
bool underlined = hGrp->GetBool("TreeActiveUnderlined",false);
bool overlined = hGrp->GetBool("TreeActiveOverlined",false);
f.setBold(bold);
f.setItalic(italic);
f.setUnderline(underlined);
f.setOverline(overlined);
@@ -1313,6 +1319,7 @@ void DocumentItem::slotHighlightObject (const Gui::ViewProviderDocumentObject& o
color = QColor((col >> 24) & 0xff,(col >> 16) & 0xff,(col >> 8) & 0xff);
}
else {
f.setBold(false);
f.setItalic(false);
f.setUnderline(false);
f.setOverline(false);

0 comments on commit 34a0c7b

Please sign in to comment.
You can’t perform that action at this time.