[GRASS-dev] [GRASS GIS] #3402: g.gui.gmodeler: trying to add command pushes CPU to 100% and provokes freeze
GRASS GIS
trac at osgeo.org
Mon Aug 21 09:44:51 PDT 2017
#3402: g.gui.gmodeler: trying to add command pushes CPU to 100% and provokes
freeze
--------------------------+-----------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.2.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords: gmodeler freeze
CPU: Unspecified | Platform: Unspecified
--------------------------+-----------------------------
Comment (by mlennert):
Replying to [comment:5 mlennert]:
>
> Commenting out the SearchModuleWidget seems to do the trick:
>
> {{{
> Index: gui/wxpython/gmodeler/dialogs.py
> ===================================================================
> --- gui/wxpython/gmodeler/dialogs.py (révision 71421)
> +++ gui/wxpython/gmodeler/dialogs.py (copie de travail)
> @@ -201,11 +201,11 @@
> self.cmd_prompt.promptRunCmd.connect(self.OnCommand)
> self.cmd_prompt.commandSelected.connect(
> lambda command: self.label.SetValue(command))
> - self.search = SearchModuleWidget(parent=self.panel,
> + '''self.search = SearchModuleWidget(parent=self.panel,
> model=menuModel.GetModel(),
> showTip=True)
> self.search.moduleSelected.connect(
> - lambda name: self.cmd_prompt.SetTextAndFocus(name + ' '))
> + lambda name: self.cmd_prompt.SetTextAndFocus(name + '
'))'''
> wx.CallAfter(self.cmd_prompt.SetFocus)
>
> self.label = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY)
> @@ -249,8 +249,8 @@
> btnSizer.Realize()
>
> mainSizer = wx.BoxSizer(wx.VERTICAL)
> - mainSizer.Add(self.search, proportion=0,
> - flag=wx.EXPAND | wx.ALL, border=3)
> + '''mainSizer.Add(self.search, proportion=0,
> + flag=wx.EXPAND | wx.ALL, border=3)'''
> mainSizer.Add(cmdSizer, proportion=1,
> flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP,
border=3)
> mainSizer.Add(labelSizer, proportion=1,
> }}}
>
> I now get a functioning window and when I start entering a module name,
I get the incremental search, can select a module and add it. Will need to
test some more.
>
However: I can only get one module onto the modeler canvas that way.
Afterwards, when I click on the button to add a module again, nothing
happens at all.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3402#comment:6>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list