Skip to content

Commit

Permalink
wxGUI/dbmgr: fix show attribute table for vector map from another mapset
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Jul 12, 2023
1 parent e225508 commit 88774ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gui/wxpython/dbmgr/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3069,6 +3069,7 @@ def __init__(self, parent, id, parentDialog, style=wx.BK_DEFAULT):
self.parent = parent
self.parentDialog = parentDialog
self.mapDBInfo = self.parentDialog.dbMgrData["mapDBInfo"]
vectName = self.parentDialog.dbMgrData["vectName"]

#
# drivers
Expand All @@ -3083,7 +3084,11 @@ def __init__(self, parent, id, parentDialog, style=wx.BK_DEFAULT):
# get default values
#
self.defaultConnect = {}
vectMapset = vectName.split("@")[-1]
defaultMapset = RunCommand("g.mapset", flags="p", read=True, quiet=True).strip()
RunCommand("g.mapset", mapset=vectMapset, quiet=True)
connect = RunCommand("db.connect", flags="p", read=True, quiet=True)
RunCommand("g.mapset", mapset=defaultMapset, quiet=True)

for line in connect.splitlines():
item, value = line.split(":", 1)
Expand Down

0 comments on commit 88774ce

Please sign in to comment.