Skip to content

Commit

Permalink
wxGUI: fix map display combobox option after switching between toolba…
Browse files Browse the repository at this point in the history
…rs (#2625)
  • Loading branch information
tmszi committed Jan 19, 2023
1 parent 8d71654 commit aca771d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gui/wxpython/mapdisp/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@ def AddToolbar(self, name, fixed=False):
CloseButton(False).Layer(2).
BestSize((self.toolbars['map'].GetBestSize())))

# nviz
elif name == "nviz":
self.toolbars["map"].combo.SetValue(_("3D view"))
self.AddNviz()

# vector digitizer
elif name == "vdigit":
self.toolbars['map'].combo.SetValue(_("Vector digitizer"))
Expand Down
7 changes: 5 additions & 2 deletions gui/wxpython/mapdisp/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,13 @@ def OnSelectTool(self, event):
if tool == self.toolId['2d']:
self.ExitToolbars()
self.Enable2D(True)
self.parent.MapWindow.SetFocus()

elif tool == self.toolId['3d'] and \
not (self.parent.MapWindow3D and self.parent.IsPaneShown('3d')):
self.ExitToolbars()
self.parent.AddNviz()
self.parent.AddToolbar("nviz")
self.parent.MapWindow.SetFocus()

elif tool == self.toolId['vdigit'] and \
not self.parent.GetToolbar('vdigit'):
Expand All @@ -251,7 +253,8 @@ def OnSelectTool(self, event):

elif tool == self.toolId['rdigit']:
self.ExitToolbars()
self.parent.AddRDigit()
self.parent.AddToolbar("rdigit")
self.parent.MapWindow.SetFocus()

def OnAnalyze(self, event):
"""Analysis tools menu
Expand Down

0 comments on commit aca771d

Please sign in to comment.