make the filename tooltip show the actual filename
This commit is contained in:
committed by
Chris Hennes
parent
0745d40f86
commit
f2a392c8f1
@@ -880,6 +880,15 @@ QVariant PropertyStringItem::editorData(QWidget* editor) const
|
||||
return {le->text()};
|
||||
}
|
||||
|
||||
QVariant PropertyStringItem::toolTip(const App::Property* prop) const
|
||||
{
|
||||
// For the FileName property, show the actual file path in the tooltip
|
||||
if (prop && std::string(prop->getName()) == "FileName") {
|
||||
return value(prop);
|
||||
}
|
||||
return PropertyItem::toolTip(prop);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
PROPERTYITEM_SOURCE(Gui::PropertyEditor::PropertyFontItem)
|
||||
|
||||
@@ -274,6 +274,7 @@ class GuiExport PropertyStringItem: public PropertyItem
|
||||
) const override;
|
||||
void setEditorData(QWidget* editor, const QVariant& data) const override;
|
||||
QVariant editorData(QWidget* editor) const override;
|
||||
QVariant toolTip(const App::Property*) const override;
|
||||
|
||||
protected:
|
||||
QVariant value(const App::Property*) const override;
|
||||
|
||||
Reference in New Issue
Block a user