Преглед изворни кода

wxGUI/dbmgr: fix clik on the 'Modify layer' button if vector map doesn't have any layers (#1334)

Tomas Zigo пре 4 година
родитељ
комит
437d55c9bb
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      gui/wxpython/dbmgr/base.py

+ 5 - 1
gui/wxpython/dbmgr/base.py

@@ -3729,7 +3729,11 @@ class LayerBook(wx.Notebook):
     def OnModifyLayer(self, event):
     def OnModifyLayer(self, event):
         """Modify layer connection settings"""
         """Modify layer connection settings"""
 
 
-        layer = int(self.modifyLayerWidgets['layer'][1].GetStringSelection())
+        layer = self.modifyLayerWidgets['layer'][1].GetStringSelection()
+        if not layer:
+            return
+
+        layer = int(layer)
 
 
         modify = False
         modify = False
         if self.modifyLayerWidgets['driver'][1].GetStringSelection() != \
         if self.modifyLayerWidgets['driver'][1].GetStringSelection() != \