Skip to content

Commit

Permalink
Merge pull request #47 from GenEugene/develop
Browse files Browse the repository at this point in the history
Hotfix for window toggling when hidden
  • Loading branch information
GenEugene committed Dec 9, 2023
2 parents 7498bcf + 3a04b4a commit bd746f3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions GETOOLS_SOURCE/modules/GeneralWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def FramesCollapse(self, value, *args): # TODO collapse function for sub frames
cmds.frameLayout(self.frameExperimental, edit = True, collapse = value)

# DOCKING
def DockCheckVisible(self, *args):
return cmds.dockControl(Settings.dockName, query = True, visible = True)
def DockCheck(self, *args):
return cmds.dockControl(Settings.dockName, query = True, exists = True)
def DockDelete(self, *args):
Expand Down Expand Up @@ -225,9 +227,10 @@ def RUN_DOCKED(self, path = "", forced = False, *args):
self.directory = path

if (forced == False and self.DockCheck()): # for script toggling. Comment these 3 lines if you need to deactivate toggling
self.DockDelete()
print("{0} closed".format(GeneralWindow.title))
return
if (self.DockCheckVisible()):
self.DockDelete()
print("{0} closed".format(GeneralWindow.title))
return

self.DockDelete()
self.WindowCreate()
Expand Down

0 comments on commit bd746f3

Please sign in to comment.