Просмотр исходного кода

add ComboBox event handler (#363)

fixes #3502, this needed because of inconsistencies between
platforms with wxpython/wxwidgets event handling for ComboBox
Anna Petrasova 5 лет назад
Родитель
Сommit
724eab03dc
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      gui/wxpython/gui_core/forms.py

+ 4 - 0
gui/wxpython/gui_core/forms.py

@@ -1712,7 +1712,9 @@ class CmdPanel(wx.Panel):
                             win = gselect.LocationSelect(parent=which_panel,
                             win = gselect.LocationSelect(parent=which_panel,
                                                          value=value)
                                                          value=value)
                             win.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
                             win.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
+                            win.Bind(wx.EVT_COMBOBOX, self.OnUpdateSelection)
                             win.Bind(wx.EVT_TEXT, self.OnSetValue)
                             win.Bind(wx.EVT_TEXT, self.OnSetValue)
+                            win.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
 
 
                         elif prompt == 'mapset':
                         elif prompt == 'mapset':
                             if p.get('age', 'old') == 'old':
                             if p.get('age', 'old') == 'old':
@@ -1724,7 +1726,9 @@ class CmdPanel(wx.Panel):
                                 parent=which_panel, value=value, new=new,
                                 parent=which_panel, value=value, new=new,
                                 multiple=p.get('multiple', False))
                                 multiple=p.get('multiple', False))
                             win.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
                             win.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
+                            win.Bind(wx.EVT_COMBOBOX, self.OnUpdateSelection)
                             win.Bind(wx.EVT_TEXT, self.OnSetValue)
                             win.Bind(wx.EVT_TEXT, self.OnSetValue)
+                            win.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
 
 
                         elif prompt == 'dbase':
                         elif prompt == 'dbase':
                             win = gselect.DbaseSelect(
                             win = gselect.DbaseSelect(