grass
grass copied to clipboard
wxGUI/dbmgr: fix removing map table layer and layer related Browse data and Manage tables page (tab)
trafficstars
Describe the bug Removing map table layer don't work and related layer page (tab) on the Browse data and Manage tables page (tab) aren't deleted too.
To Reproduce Steps to reproduce the behavior:
- Launch Attribute Table Manager e.g
g.gui.dbmgr geology - Switch to Manage layers page (tab)
- Create new table with name e.g. test (right side on the Add layer page (tab))
- Add new layer with layer number 2, and choose test table from table choice widget and hit Add layer button
- On the Manage layers page (tab) switch to Remove layer page (tab)
- Choose layer 2 from Layer to remove ComboBox widget choices and hit Remove layer button
- See error
Traceback (most recent call last):
File "/usr/lib64/grass83/gui/wxpython/dbmgr/base.py", line 3815, in OnDeleteLayer
self.parentDialog.parentDbMgrBase.UpdateDialog(layer=layer)
File "/usr/lib64/grass83/gui/wxpython/dbmgr/manager.py", line 253, in UpdateDialog
DbMgrBase.UpdateDialog(self, layer=layer)
File "/usr/lib64/grass83/gui/wxpython/dbmgr/base.py", line 860, in UpdateDialog
self.pages["browse"].DeletePage(layer)
File "/usr/lib64/grass83/gui/wxpython/dbmgr/base.py", line 1037, in DeletePage
self.selLayer = self.layers[self.GetSelection()]
IndexError: list index out of range
Expected behavior Removing map table layer should be work without error message, and related layer page (tab) on the Browse data and Manage tables page (tab) be deleted too.
System description (please complete the following information):
- Operating System: all
- GRASS GIS version: all