From 3f5fbef881990185fbbbf899c31513d600c1bb3c Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Tue, 23 Mar 2021 14:18:19 -0500 Subject: [PATCH] [Draft] Fix bug in data entry on scale w/ uniform When entering a scale factor, if uniform scaling is on, the current code keeps appending zeroes as you type, forcing you to delete them before entering your next digit. This commit fixes that by ensuring that the widget that you are currently editing is not updated continuously. Fixes #0004601 --- src/Mod/Draft/drafttaskpanels/task_scale.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/Draft/drafttaskpanels/task_scale.py b/src/Mod/Draft/drafttaskpanels/task_scale.py index a19c75fc7e..28e31ab9fb 100644 --- a/src/Mod/Draft/drafttaskpanels/task_scale.py +++ b/src/Mod/Draft/drafttaskpanels/task_scale.py @@ -119,9 +119,12 @@ class ScaleTaskPanel: def setValue(self, val=None): """Set the value of the points.""" if self.lock.isChecked(): - self.xValue.setValue(val) - self.yValue.setValue(val) - self.zValue.setValue(val) + if not self.xValue.hasFocus(): + self.xValue.setValue(val) + if not self.yValue.hasFocus(): + self.yValue.setValue(val) + if not self.zValue.hasFocus(): + self.zValue.setValue(val) if self.sourceCmd: self.sourceCmd.scaleGhost(self.xValue.value(),self.yValue.value(),self.zValue.value(),self.relative.isChecked())