|
@@ -45,6 +45,7 @@ import grass.script as grass
|
|
|
sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
|
|
|
|
|
|
from core.giface import StandaloneGrassInterface
|
|
|
+from core.globalvar import CheckWxVersion
|
|
|
from gmodeler.frame import ModelFrame
|
|
|
|
|
|
def main():
|
|
@@ -52,7 +53,8 @@ def main():
|
|
|
gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
|
|
|
|
|
|
app = wx.PySimpleApp()
|
|
|
- wx.InitAllImageHandlers()
|
|
|
+ if not CheckWxVersion([2, 9]):
|
|
|
+ wx.InitAllImageHandlers()
|
|
|
frame = ModelFrame(parent = None, giface = StandaloneGrassInterface())
|
|
|
if options['file']:
|
|
|
frame.LoadModelFile(options['file'])
|