From cc88c21fae243c7e6fa12f0b789de0ff868da5a6 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 29 Mar 2021 23:45:48 +0200 Subject: [PATCH] Arch: Fix displayed rotation values when adding or editing window components This ensures the rotation edge and mode GUI elements are cleared when starting to add or edit a component. Previously, when adding a new component or editing one without rotation, the GUI elements would retain the value from the previously edited component, which made it hard to check that components did not have any rotation, and would make it easy to accidentally add rotation to components that did not need it (just by clicking edit and confirming). --- src/Mod/Arch/ArchWindow.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index ac0011ba34..8326d1a3d6 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -1442,6 +1442,8 @@ class _ArchWindowTaskPanel: self.field3.setText('') self.field4.setText('') self.field5.setText('') + self.field6.setText(QtGui.QApplication.translate("Arch", "Get selected edge", None)) + self.field7.setCurrentIndex(0) self.addp4.setChecked(False) self.addp5.setChecked(False) self.newtitle.setVisible(True) @@ -1489,6 +1491,8 @@ class _ArchWindowTaskPanel: if self.obj: if comp in self.obj.WindowParts: ind = self.obj.WindowParts.index(comp) + self.field6.setText(QtGui.QApplication.translate("Arch", "Get selected edge", None)) + self.field7.setCurrentIndex(0) for i in range(5): f = getattr(self,"field"+str(i+1)) t = self.obj.WindowParts[ind+i]