[GRASS-SVN] r71678 - grass/trunk/gui/wxpython/gcp

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 11 10:17:09 PST 2017


Author: mmetz
Date: 2017-11-11 10:17:09 -0800 (Sat, 11 Nov 2017)
New Revision: 71678

Modified:
   grass/trunk/gui/wxpython/gcp/manager.py
Log:
wxGUI: fix vector support in GCP manager (#3066)

Modified: grass/trunk/gui/wxpython/gcp/manager.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/manager.py	2017-11-11 16:42:45 UTC (rev 71677)
+++ grass/trunk/gui/wxpython/gcp/manager.py	2017-11-11 18:17:09 UTC (rev 71678)
@@ -506,7 +506,7 @@
             wx.StaticText(
                 parent=self,
                 id=wx.ID_ANY,
-                label=_('Select group:')),
+                label=_('Select/create group:')),
             flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL,
             border=5,
             pos=(
@@ -514,7 +514,7 @@
                 1))
         self.cb_group = wx.ComboBox(parent=self, id=wx.ID_ANY,
                                     choices=self.groupList, size=(350, -1),
-                                    style=wx.CB_DROPDOWN | wx.CB_READONLY)
+                                    style=wx.CB_DROPDOWN)
         self.sizer.Add(self.cb_group, flag=wx.ALIGN_LEFT |
                        wx.ALIGN_CENTER_VERTICAL | wx.ALL, border=5, pos=(1, 2))
 
@@ -588,6 +588,8 @@
 
     def OnMkGroup(self, event):
         """Create new group in source location/mapset"""
+	if self.xygroup == '':
+	    self.xygroup = self.cb_group.GetValue()
         dlg = GroupDialog(parent=self, defaultGroup=self.xygroup)
         dlg.DisableSubgroupEdit()
         dlg.ShowModal()
@@ -603,6 +605,10 @@
 
     def OnVGroup(self, event):
         """Add vector maps to group"""
+	
+	if self.xygroup == '':
+	    self.xygroup = self.cb_group.GetValue()
+
         dlg = VectGroup(parent=self,
                         id=wx.ID_ANY,
                         grassdb=self.grassdatabase,
@@ -2460,6 +2466,11 @@
                 '@' +
                 self.xymapset)
 
+	dirname = os.path.dirname(self.vgrpfile)
+	
+	if not os.path.exists(dirname):
+	    os.makedirs(dirname)
+
         f = open(self.vgrpfile, mode='w')
         try:
             for vect in vgrouplist:



More information about the grass-commit mailing list