mirror of
https://github.com/lalbornoz/roar.git
synced 2024-12-23 04:46:37 +00:00
roar.py: fix argument handling.
This commit is contained in:
parent
771f124314
commit
2bbdec394f
11
roar.py
11
roar.py
@ -15,14 +15,15 @@ import wx
|
||||
# Entry point
|
||||
def main(*argv):
|
||||
wxApp, roarClient = wx.App(False), RoarClient(None)
|
||||
argv0, argv = argv[0], argv[1:]
|
||||
if len(argv) >= 1:
|
||||
if argv[2].endswith(".lst"):
|
||||
roarClient.assetsWindow._load_list(argv[2])
|
||||
roarClient.canvasPanel.commands.canvasPathName = argv[1]
|
||||
rc, error = roarClient.canvasPanel.canvas.importStore.importTextFile(argv[1])
|
||||
if (len(argv) >= 2) and (argv[1].endswith(".lst")):
|
||||
roarClient.assetsWindow._load_list(argv[1])
|
||||
roarClient.canvasPanel.commands.canvasPathName = argv[0]
|
||||
rc, error = roarClient.canvasPanel.canvas.importStore.importTextFile(argv[0])
|
||||
if rc:
|
||||
roarClient.canvasPanel.update(roarClient.canvasPanel.canvas.importStore.inSize, False, roarClient.canvasPanel.canvas.importStore.outMap)
|
||||
roarClient.canvasPanel.commands.update(pathName=argv[1], undoLevel=-1)
|
||||
roarClient.canvasPanel.commands.update(pathName=argv[0], undoLevel=-1)
|
||||
else:
|
||||
print("error: {}".format(error), file=sys.stderr)
|
||||
wxApp.MainLoop()
|
||||
|
Loading…
Reference in New Issue
Block a user