From c8fbe03eb1105a67cd3fd4bb1523394a585b5a7c Mon Sep 17 00:00:00 2001
From: atlast-50 <144068262+atlast-50@users.noreply.github.com>
Date: Tue, 26 Sep 2023 18:52:20 -0400
Subject: [PATCH] Gui: Rename forumula to expression + add hotkey to expression
tooltip
Fixes #10601
---
src/Gui/DlgExpressionInput.ui | 2 +-
src/Gui/QuantitySpinBox_p.h | 8 ++++----
src/Mod/Path/Path/Base/Gui/Util.py | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/Gui/DlgExpressionInput.ui b/src/Gui/DlgExpressionInput.ui
index 4fab2ec0f6..e0a56a11ed 100644
--- a/src/Gui/DlgExpressionInput.ui
+++ b/src/Gui/DlgExpressionInput.ui
@@ -23,7 +23,7 @@
- Formula editor
+ Expression editor
diff --git a/src/Gui/QuantitySpinBox_p.h b/src/Gui/QuantitySpinBox_p.h
index 07569b2656..277c0e9f76 100644
--- a/src/Gui/QuantitySpinBox_p.h
+++ b/src/Gui/QuantitySpinBox_p.h
@@ -34,9 +34,9 @@ public:
void setExpressionText(const QString& text) {
if (text.isEmpty())
- this->setToolTip(genericFormulaEditorTooltip);
+ this->setToolTip(genericExpressionEditorTooltip);
else
- this->setToolTip(formulaEditorTooltipPrefix + text);
+ this->setToolTip(expressionEditorTooltipPrefix + text);
}
protected:
@@ -50,8 +50,8 @@ Q_SIGNALS:
private:
- const QString genericFormulaEditorTooltip = tr("Enter an expression...");
- const QString formulaEditorTooltipPrefix = tr("Expression: ");
+ const QString genericExpressionEditorTooltip = tr("Enter an expression... (=)");
+ const QString expressionEditorTooltipPrefix = tr("Expression: ");
};
#endif // QUANTITYSPINBOX_P_H
diff --git a/src/Mod/Path/Path/Base/Gui/Util.py b/src/Mod/Path/Path/Base/Gui/Util.py
index 2a2f5a98b1..a958705441 100644
--- a/src/Mod/Path/Path/Base/Gui/Util.py
+++ b/src/Mod/Path/Path/Base/Gui/Util.py
@@ -142,11 +142,11 @@ class QuantitySpinBox(QtCore.QObject):
def onWidgetValueChanged(self):
"""onWidgetValueChanged()... Slot method for determining if a change
in widget value is a result of an expression edit, or a simple spinbox change.
- If the former, emit a manual `editingFinished` signal because the Formula Editor
+ If the former, emit a manual `editingFinished` signal because the Expression editor
window returned a value to the base widget, leaving it in read-only mode,
and finishing the editing of the value. Otherwise, due nothing if the value
has not changed, or there is no active expression for the property.
- If the user closes the Formula Editor to cancel the edit, the value will not
+ If the user closes the Expression editor to cancel the edit, the value will not
be changed, and this manual signal will not be emitted."""
if self._hasExpression() and self.widget.text() != self.lastWidgetText:
self.widget.editingFinished.emit()