소스 검색

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, '-')