浏览代码

Pressing Run button in GUI dialogs open a new dialog (fixes https://trac.osgeo.org/grass/ticket/3135)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@69396 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 8 年之前
父节点
当前提交
f84046ca5e
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      gui/wxpython/core/gconsole.py

+ 5 - 3
gui/wxpython/core/gconsole.py

@@ -44,7 +44,7 @@ from gui_core.forms import GUI
 from core.debug import Debug
 from core.settings import UserSettings
 from core.giface import Notification
-
+from gui_core.widgets import FormNotebook
 
 wxCmdOutput, EVT_CMD_OUTPUT = NewEvent()
 wxCmdProgress, EVT_CMD_PROGRESS = NewEvent()
@@ -494,9 +494,11 @@ class GConsole(wx.EvtHandler):
                                                                       'opt': p.get('name', '')})
                             return
 
+                # no arguments given
                 if len(command) == 1 and hasParams and \
-                        command[0] != 'v.krige':
-                    # no arguments given
+                   not isinstance(self._guiparent, FormNotebook) and \
+                   command[0] != 'v.krige':
+                    # also parent must be checked, see #3135 for details
                     try:
                         GUI(parent=self._guiparent, giface=self._giface).ParseCommand(command)
                     except GException as e: