Skip to content

Commit

Permalink
wxGUI/vdigit: fix keyboard shortcut for activating point/line tool (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Aug 14, 2022
1 parent 838c73f commit 1f72405
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gui/wxpython/vdigit/g.gui.vdigit.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ <h3>DIGITIZER TOOLBAR</h3>
<dt><img src="icons/point-create.png" alt="icon">&nbsp;
<em>Digitize new point</em></dt>
<dd>Add new point to vector map and optionally define its
attributes.</dd>
attributes, Ctrl+P.</dd>

<dt><img src="icons/line-create.png" alt="icon">&nbsp;
<em>Digitize new line</em></dt>
<dd>Add new line to vector map and optionally define its
attributes.</dd>
attributes, Ctrl+L.</dd>

<dt><img src="icons/boundary-create.png" alt="icon">&nbsp;
<em>Digitize new boundary</em></dt>
Expand Down
8 changes: 4 additions & 4 deletions gui/wxpython/vdigit/mapwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ def OnKeyDown(self, event):

event = None
if not shift:
if kc == ord('P'):
event = wx.CommandEvent(winid=self.toolbar.addPoint)
if kc == ord("P"):
event = wx.CommandEvent(id=self.toolbar.addPoint)
tool = self.toolbar.OnAddPoint
elif kc == ord('L'):
event = wx.CommandEvent(winid=self.toolbar.addLine)
elif kc == ord("L"):
event = wx.CommandEvent(id=self.toolbar.addLine)
tool = self.toolbar.OnAddLine
if event:
self.toolbar.OnTool(event)
Expand Down

0 comments on commit 1f72405

Please sign in to comment.