Project

Profile

Help

Revision 80361b92

ID80361b92af55d0580443b315a2a27ffcb5276cac
Parent 40ff0cc0
Child 3edf87c2

Added by Vincent Le Goff about 2 months ago

Fix #152: importing a world from a file fails

View differences:

src/sharp/engine.py
82 82
            instructions = self.feed(code, variables=variables)
83 83
            instructions = "\n".join(instructions).splitlines()
84 84
            pycode = "def script():\n    " + "\n    ".join(instructions) + "\n    yield None"
85
            print(instructions, pycode)
86 85
            globals = self.globals
87 86
            globals["vars"] = self.locals
88 87
            locals = {}
src/ui/dialogs/connection.py
378 378
        choose_file = t("ui.button.choose_file")
379 379
        extensions = "Zip archive (*.zip)|*.zip"
380 380
        dialog = wx.FileDialog(None, choose_file,
381
                "", "", extensions, wx.OPEN)
381
                "", "", extensions, wx.FD_OPEN)
382 382
        result = dialog.ShowModal()
383 383
        if result == wx.ID_OK:
384 384
            filename = dialog.GetPath()
src/ui/window.py
341 341
        choose_file = t("ui.button.choose_file")
342 342
        extensions = "Zip archive (*.zip)|*.zip"
343 343
        dialog = wx.FileDialog(None, choose_file,
344
                "", "", extensions, wx.OPEN)
344
                "", "", extensions, wx.FD_OPEN)
345 345
        result = dialog.ShowModal()
346 346
        if result == wx.ID_OK:
347 347
            filename = dialog.GetPath()

Also available in: Unified diff