Skip to content

Commit

Permalink
Remove inconsitent size update method
Browse files Browse the repository at this point in the history
  • Loading branch information
sowwic committed Oct 14, 2020
1 parent c38370e commit 5ed3270
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions dsRenamingTool/mainDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def __init__(self):

self.setWindowTitle(self.WINDOW_TITLE)
self.settings = self.loadSettings()
self.updateSizeLimit()

self.workspaceControlName = "{0}WorkspaceControl".format(self.UI_NAME)
if pm.workspaceControl(self.workspaceControlName, q=1, ex=1):
Expand Down Expand Up @@ -164,32 +163,10 @@ def rename(self):
indexPadding=self.indexPaddingSpinBox.value(),
startIndex=self.startingIndexSpinBox.value())

def updateSizeLimit(self):
if self.isFloating():
self.setMinimumSize(300, 170)
self.setMaximumSize(16777215, 16777215)

try:
self.nativeParentWidget().setMaximumSize(self.maximumSize())
self.nativeParentWidget().setMinimumSize(self.minimumSize())
self.resize(self.minimumSize())
except Exception:
pass

else:
try:
self.nativeParentWidget().setFixedHeight(200)
except BaseException:
pass

def editSuffixAliases(self):
editDialog = aliasesDialog.AliasDialog(parent=self)
editDialog.show()

# Events
def showEvent(self, e):
self.updateSizeLimit()

def hideEvent(self, e):
self.saveSettings()

Expand Down Expand Up @@ -233,4 +210,3 @@ def saveSettings(self):

uiScript = "import dsRenamingTool\ndsRenamer = dsRenamingTool.Dialog()"
dsRenamer.show(dockable=1, uiScript=uiScript)
dsRenamer.updateSizeLimit()

0 comments on commit 5ed3270

Please sign in to comment.