Skip to content

Commit

Permalink
Fix bug with add new item option button
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzomafizzo committed May 10, 2014
1 parent 49a78df commit 3f2e016
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions starcheat/gui/itemedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,17 @@ def new_item_edit_options(self, new):
else:
selected = self.ui.variant.currentItem()

# TODO: need a better way to lay this out. it's going to get big
# TODO: need a better way to lay this out. it's going to get big and messy fast

# this is for the qinputdialog stuff. can't set signals on them
generic = False
if selected.option[0] in ["inventoryIcon", "image", "largeImage"]:
if new:
# needs to be here or new opts get detected as string (?)
dialog = ItemEditOptions(self.dialog, selected.option[0], selected.option[1])
def get_option():
data = dialog.ui.options.toPlainText()
return dialog.ui.name.text(), json.loads(data)
elif selected.option[0] in ["inventoryIcon", "image", "largeImage"]:
dialog = ImageBrowser(self.dialog, self.assets)
def get_option():
return selected.option[0], dialog.get_key()
Expand Down

0 comments on commit 3f2e016

Please sign in to comment.