From f1e3c30d6adb2885717801084740deee91d8e955 Mon Sep 17 00:00:00 2001 From: Uwe Date: Tue, 14 Jun 2022 01:21:17 +0200 Subject: [PATCH] [FEM] point filter: use a LineEdit to output value - that one copy the result to the clipboard - also fix a typo --- src/Mod/Fem/Gui/TaskPostBoxes.cpp | 2 +- src/Mod/Fem/Gui/TaskPostDataAtPoint.ui | 39 +++++++++++++++++-- .../Fem/Gui/ViewProviderFemPostFunction.cpp | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index 350793a76c..6fe3936e23 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -1102,7 +1102,7 @@ void TaskPostDataAtPoint::showValue(double pointValue, const char* unitStr) QString value = QString::fromStdString(toString(pointValue)); QString unit = QString::fromUtf8(unitStr); - ui->ValueAtPoint->setText(tr("Value: %1 %2").arg(value, unit)); + ui->ValueAtPoint->setText(tr("%1 %2").arg(value, unit)); QString field = ui->Field->currentText(); QString posX = ui->centerX->text(); diff --git a/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui b/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui index fd44452012..a54cf63cea 100644 --- a/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui +++ b/src/Mod/Fem/Gui/TaskPostDataAtPoint.ui @@ -7,7 +7,7 @@ 0 0 300 - 156 + 184 @@ -88,8 +88,41 @@ - - + + + + + Value: + + + + + + + + 0 + 0 + + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp index d36fe46f8d..663dc027aa 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp @@ -270,7 +270,7 @@ bool ViewProviderFemPostFunction::findScaleFactor(double& scale) const if (bbox.hasVolume()) { float dx, dy, dz; bbox.getSize(dx, dy, dz); - // we want the manipulator to have 20 % if the max size of the object + // we want the manipulator to have 20 % of the max size of the object scale = 0.2 * std::max(std::max(dx, dy), dz); return true; }