From bf9e646ebe093cbc0df1b85e85154eba11a6d40f Mon Sep 17 00:00:00 2001 From: donovaly Date: Tue, 18 Feb 2020 02:37:36 +0100 Subject: [PATCH] [TD] LeadlerLine dialog beautifications (add tooltips, use a display widget) see https://forum.freecadweb.org/viewtopic.php?f=35&t=43360&p=369885#p369885 --- src/Mod/TechDraw/App/DrawLeaderLine.cpp | 2 +- src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui | 5 +++- src/Mod/TechDraw/Gui/TaskLeaderLine.cpp | 4 +-- src/Mod/TechDraw/Gui/TaskLeaderLine.ui | 36 ++++++++++++++++++----- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawLeaderLine.cpp b/src/Mod/TechDraw/App/DrawLeaderLine.cpp index bd3bc327ea..31e22bb4f9 100644 --- a/src/Mod/TechDraw/App/DrawLeaderLine.cpp +++ b/src/Mod/TechDraw/App/DrawLeaderLine.cpp @@ -57,7 +57,7 @@ DrawLeaderLine::DrawLeaderLine(void) ADD_PROPERTY_TYPE(StartSymbol, (-1), group, App::Prop_None, "Symbol (arrowhead) for start of line"); ADD_PROPERTY_TYPE(EndSymbol, (-1), group, App::Prop_None, "Symbol (arrowhead) for end of line"); ADD_PROPERTY_TYPE(Scalable ,(false),group,App::Prop_None,"Scale line with LeaderParent"); - ADD_PROPERTY_TYPE(AutoHorizontal ,(getDefAuto()),group,App::Prop_None,"Forces last line segment horizontal"); + ADD_PROPERTY_TYPE(AutoHorizontal ,(getDefAuto()),group,App::Prop_None,"Forces last line segment to be horizontal"); //hide the DrawView properties that don't apply to Leader ScaleType.setStatus(App::Property::ReadOnly,true); diff --git a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui index d8d7bfaafb..f186f06fb1 100644 --- a/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui +++ b/src/Mod/TechDraw/Gui/DlgPrefsTechDraw3.ui @@ -540,8 +540,11 @@ 0 + + Forces last leader line segment to be horizontal + - Leader Auto Horizontal + Leader Line Auto Horizontal true diff --git a/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp b/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp index 2128294486..464a4ee63b 100644 --- a/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp +++ b/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp @@ -250,7 +250,7 @@ void TaskLeaderLine::setUiPrimary() if (m_baseFeat != nullptr) { std::string baseName = m_baseFeat->getNameInDocument(); - ui->leBaseView->setText(Base::Tools::fromStdString(baseName)); + ui->tbBaseView->setText(Base::Tools::fromStdString(baseName)); } ui->pbTracker->setText(QString::fromUtf8("Pick points")); @@ -289,7 +289,7 @@ void TaskLeaderLine::setUiEdit() if (m_lineFeat != nullptr) { std::string baseName = m_lineFeat->LeaderParent.getValue()->getNameInDocument(); - ui->leBaseView->setText(Base::Tools::fromStdString(baseName)); + ui->tbBaseView->setText(Base::Tools::fromStdString(baseName)); ui->cboxStartSym->setCurrentIndex(m_lineFeat->StartSymbol.getValue() + 1); ui->cboxEndSym->setCurrentIndex(m_lineFeat->EndSymbol.getValue() + 1); ui->pbTracker->setText(QString::fromUtf8("Edit points")); diff --git a/src/Mod/TechDraw/Gui/TaskLeaderLine.ui b/src/Mod/TechDraw/Gui/TaskLeaderLine.ui index 2081c176df..2a36cf6b1d 100644 --- a/src/Mod/TechDraw/Gui/TaskLeaderLine.ui +++ b/src/Mod/TechDraw/Gui/TaskLeaderLine.ui @@ -49,10 +49,29 @@ + + + + Base View + + + - + - false + true + + + + 0 + 0 + + + + + 16777215 + 22 + false @@ -63,12 +82,8 @@ false - - - - - - Base View + + Qt::ScrollBarAlwaysOff @@ -111,6 +126,11 @@ + + First pick the start pint of the line, +then at least a second point. +You can pick further points to get line segments. + Pick Points