Draft: Fix switchUi method bug (#27422)

* Draft: Fix switchUi method bug

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Caio Venâncio do Rosário
2026-02-10 06:33:35 -03:00
committed by GitHub
parent 1046c3682a
commit bf51a00dfd

View File

@@ -1006,6 +1006,14 @@ class DraftToolBar:
self.state.append(self.xValue.isVisible())
self.state.append(self.yValue.isVisible())
self.state.append(self.zValue.isVisible())
self.state.append(self.labellength.isVisible())
self.state.append(self.labelangle.isVisible())
self.state.append(self.pointButton.isVisible())
self.state.append(self.lengthValue.isVisible())
self.state.append(self.angleValue.isVisible())
self.state.append(self.angleLock.isVisible())
self.state.append(self.isRelative.isVisible())
self.state.append(self.isGlobal.isVisible())
self.hideXYZ()
else:
if self.state:
@@ -1021,6 +1029,22 @@ class DraftToolBar:
self.yValue.show()
if self.state[5]:
self.zValue.show()
if self.state[6]:
self.labellength.show()
if self.state[7]:
self.labelangle.show()
if self.state[8]:
self.pointButton.show()
if self.state[9]:
self.lengthValue.show()
if self.state[10]:
self.angleValue.show()
if self.state[11]:
self.angleLock.show()
if self.state[12]:
self.isRelative.show()
if self.state[13]:
self.isGlobal.show()
self.state = None
def setTitle(self, title, icon="Draft_Draft"):