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).
This commit is contained in:
Matthijs Kooijman
2021-03-29 23:45:48 +02:00
committed by Yorik van Havre
parent 788e8aea69
commit cc88c21fae

View File

@@ -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]