Skip to content

Commit

Permalink
wxGUI/vdigit: fix map window focus after starting edits (#2525)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi authored Nov 8, 2024
1 parent b929809 commit 8716ba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gui/wxpython/dbmgr/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ def OnCloseWindow(self, event):
if self.parent and self.parent.GetName() == "LayerManager":
# deregister ATM
self.parent.dialogs["atm"].remove(self)
# set map window focus
self.parent.GetMapDisplay().GetMapWindow().SetFocus()

if not isinstance(event, wx.CloseEvent):
self.Destroy()
Expand Down
2 changes: 2 additions & 0 deletions gui/wxpython/vdigit/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,8 @@ def OnSelectMap(self, event):
# select the given map layer for editing
self.StartEditing(self.layers[selection])

wx.CallLater(100, self.MapWindow.SetFocus)

event.Skip()

def StartEditing(self, mapLayer):
Expand Down

0 comments on commit 8716ba5

Please sign in to comment.