Преглед изворни кода

wxGUI/prompt: reacting to - (minus) key in all cases in command console (relates to https://trac.osgeo.org/grass/ticket/2152)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58788 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras пре 11 година
родитељ
комит
98dbbfb347
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      gui/wxpython/gui_core/prompt.py

+ 4 - 2
gui/wxpython/gui_core/prompt.py

@@ -404,8 +404,10 @@ class GPromptSTC(GPrompt, wx.stc.StyledTextCtrl):
                 return
             self.ShowList()
 
-        # complete flags after pressing '-'       
-        elif event.GetKeyCode() == 45 and not event.ShiftDown(): 
+        # complete flags after pressing '-'
+        elif (event.GetKeyCode() == 45 and not event.ShiftDown()) \
+                or event.GetKeyCode() == wx.WXK_NUMPAD_SUBTRACT \
+                or event.GetKeyCode() == wx.WXK_SUBTRACT:
             self.autoCompList = list()
             entry = self.GetTextLeft()
             self.InsertText(pos, '-')