浏览代码

wxGUI: fix d.out.file command parsing with --overwrite (#1284)

Anna Petrasova 4 年之前
父节点
当前提交
384187868b
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      gui/wxpython/mapdisp/frame.py

+ 5 - 1
gui/wxpython/mapdisp/frame.py

@@ -683,7 +683,11 @@ class MapFrame(SingleMapFrame):
             return
         width, height = self.MapWindow.GetClientSize()
         for param in command[1:]:
-            p, val = param.split('=')
+            try:
+                p, val = param.split('=')
+            except ValueError:
+                # --overwrite
+                continue
             if p == 'format':  # must be there
                 if self.IsPaneShown('3d'):
                     extType = 'ppm'