From d91e2b6bba3cf2afd1f2fd8fbadba32fee9c286b Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Tue, 19 Apr 2016 09:30:44 +0200 Subject: [PATCH] Tooltips restored in ComponentEditor --- GUI/coregui/Models/PropertyAttribute.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/GUI/coregui/Models/PropertyAttribute.cpp b/GUI/coregui/Models/PropertyAttribute.cpp index 73452fdf760..4eaf18820c1 100644 --- a/GUI/coregui/Models/PropertyAttribute.cpp +++ b/GUI/coregui/Models/PropertyAttribute.cpp @@ -16,6 +16,7 @@ #include "PropertyAttribute.h" #include "SessionItem.h" +#include "tooltipdatabase.h" #include <QDebug> PropertyAttribute::PropertyAttribute(PropertyAttribute::Appearance appearance, @@ -181,6 +182,14 @@ PropertyAttribute PropertyAttribute::fromItem(SessionItem *item) attribute.setReadOnly(); if (!item->isEnabled()) attribute.setDisabled(); + + if(attribute.getToolTip().isEmpty()) { + if(SessionItem *parent = item->parent()) { + attribute.setToolTip(ToolTipDataBase::getSampleViewToolTip( + parent->modelType(), item->displayName())); + } + } + return attribute; } -- GitLab