From 301b201c6d8767b66ea59aa2cb843640d1fc060b Mon Sep 17 00:00:00 2001 From: tetektoza Date: Tue, 17 Jun 2025 01:08:10 +0200 Subject: [PATCH] Gui: Change ordering of names in Link property As the title says, currently it is: ObjName (Label), this patch changes it to Label (ObjName) to be more user friendly. --- src/Gui/Dialogs/DlgPropertyLink.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Gui/Dialogs/DlgPropertyLink.cpp b/src/Gui/Dialogs/DlgPropertyLink.cpp index 17dd3a06ef..87ec251ded 100644 --- a/src/Gui/Dialogs/DlgPropertyLink.cpp +++ b/src/Gui/Dialogs/DlgPropertyLink.cpp @@ -173,8 +173,8 @@ DlgPropertyLink::formatObject(App::Document* ownerDoc, App::DocumentObject* obj, if (obj->Label.getStrValue() == obj->getNameInDocument()) { return QLatin1String(objName); } - return QStringLiteral("%1 (%2)").arg(QLatin1String(objName), - QString::fromUtf8(obj->Label.getValue())); + return QStringLiteral("%1 (%2)").arg(QString::fromUtf8(obj->Label.getValue()), + QLatin1String(objName)); } auto sobj = obj->getSubObject(sub); @@ -182,10 +182,10 @@ DlgPropertyLink::formatObject(App::Document* ownerDoc, App::DocumentObject* obj, return QStringLiteral("%1.%2").arg(QLatin1String(objName), QString::fromUtf8(sub)); } - return QStringLiteral("%1.%2 (%3)") - .arg(QLatin1String(objName), - QString::fromUtf8(sub), - QString::fromUtf8(sobj->Label.getValue())); + return QStringLiteral("%1 (%2.%3)") + .arg(QString::fromUtf8(sobj->Label.getValue()), + QLatin1String(objName), + QString::fromUtf8(sub)); } static inline bool isLinkSub(const QList& links)