Skip to content

Commit

Permalink
Draft fix for metamorphose#12
Browse files Browse the repository at this point in the history
- This is probably not the best fixes, however it avoids metamorphose2
  to segfault.
  • Loading branch information
uggla committed Feb 20, 2017
1 parent d2bdd6a commit 989705c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/renamer/wxRenamerView.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,19 @@ def __init__(self, prnt, id):
# create info text of available operations
# Find largest panel, use it to set this panel size
txt = ''
txtSize = (0, 0)
for i in range(prnt.availableOperations.GetItemCount()):
op = prnt.availableOperations.GetItemText(i)
txt += "%s : %s\n\n" % (op, operations.defs[op][1])

# create temporary instance of panel to get size
op = operations.defs[op][0]
opPanel = getattr(operations, op).OpPanel(prnt, main)
size = opPanel.GetSizeTuple()
if size > txtSize:
txtSize = size
opPanel.Destroy()
#txtSize = (0, 0)
txtSize = (1000, 500)
#for i in range(prnt.availableOperations.GetItemCount()):
# op = prnt.availableOperations.GetItemText(i)
# txt += "%s : %s\n\n" % (op, operations.defs[op][1])

# # create temporary instance of panel to get size
# op = operations.defs[op][0]
# opPanel = getattr(operations, op).OpPanel(prnt, main)
# size = opPanel.GetSizeTuple()
# if size > txtSize:
# txtSize = size
# opPanel.Destroy()

fontParams = app.fontParams
fontSize = fontParams['size']
Expand Down

0 comments on commit 989705c

Please sign in to comment.