- updated the GUI fields for the Scale and Offset in the Object UI to allow only numeric values and operators in the list [/,*,+,-], spaces, dots and comma

This commit is contained in:
Marius Stanciu
2020-05-25 03:37:34 +03:00
committed by Marius
parent 84ffa68cb0
commit 5f81d415a0
4 changed files with 20 additions and 3 deletions

View File

@@ -114,7 +114,7 @@ class ObjectUI(QtWidgets.QWidget):
self.common_grid.addWidget(self.transform_label, 2, 0, 1, 2)
# ### Scale ####
self.scale_entry = FCEntry()
self.scale_entry = NumericalEvalEntry()
self.scale_entry.set_value(1.0)
self.scale_entry.setToolTip(
_("Factor by which to multiply\n"
@@ -132,7 +132,7 @@ class ObjectUI(QtWidgets.QWidget):
self.common_grid.addWidget(self.scale_button, 3, 1)
# ### Offset ####
self.offsetvector_entry = EvalEntry2()
self.offsetvector_entry = NumericalEvalTupleEntry()
self.offsetvector_entry.setText("(0.0, 0.0)")
self.offsetvector_entry.setToolTip(
_("Amount by which to move the object\n"