From d1c983a0d0ee9ab62e6c101683fc05e39c90e759 Mon Sep 17 00:00:00 2001 From: donovaly Date: Wed, 8 Jan 2020 01:35:04 +0100 Subject: [PATCH] Attachment dialog improvements - explicitly set the tooltips since the one in the .ui file were not taken for QuantitySpinBoxes (workaround for bug https://freecadweb.org/tracker/view.php?id=4059) - uniform the height of all LineEdits in the TaskAttachmentEditor.ui (the 3 angles were higher than the 3 movements) --- .../AttachmentEditor/TaskAttachmentEditor.ui | 18 ++++++++++++++++++ src/Mod/Part/Gui/TaskAttacher.cpp | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.ui b/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.ui index c42cb118b6..66a15b0fbc 100644 --- a/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.ui +++ b/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.ui @@ -270,6 +270,12 @@ 0 + + + 0 + 5 + + Rotation around the x-axis Note: The placement is expressed in local space of object being attached. @@ -296,6 +302,12 @@ Note: The placement is expressed in local space of object being attached.0 + + + 0 + 5 + + Rotation around the y-axis Note: The placement is expressed in local space of object being attached. @@ -322,6 +334,12 @@ Note: The placement is expressed in local space of object being attached.0 + + + 0 + 5 + + Rotation around the z-axis Note: The placement is expressed in local space of object being attached. diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index 8a5540f7f5..a4e988b5a6 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -215,6 +215,12 @@ TaskAttacher::TaskAttacher(Gui::ViewProviderDocumentObject *ViewProvider,QWidget Gui::Document* document = Gui::Application::Instance->getDocument(ViewProvider->getObject()->getDocument()); connectDelObject = document->signalDeletedObject.connect(bnd1); connectDelDocument = document->signalDeleteDocument.connect(bnd2); + + // set tooltips because the ones in the .ui file are not taken for QuantitySpinBoxes (see bug https://freecadweb.org/tracker/view.php?id=4059) + // FIXME: remove this once the bug is fixed + ui->attachmentOffsetRoll->setTooltipLE(QString::fromUtf8("Rotation around the x-axis\nNote: The placement is expressed in local coordinate system\nof object being attached.")); + ui->attachmentOffsetPitch->setTooltipLE(QString::fromUtf8("Rotation around the y-axis\nNote: The placement is expressed in local coordinate system\nof object being attached.")); + ui->attachmentOffsetYaw->setTooltipLE(QString::fromUtf8("Rotation around the z-axis\nNote: The placement is expressed in local coordinate system\nof object being attached.")); } TaskAttacher::~TaskAttacher()