[GRASS-SVN] r63267 - grass/trunk/gui/wxpython/vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 28 12:13:23 PST 2014


Author: mmetz
Date: 2014-11-28 12:13:23 -0800 (Fri, 28 Nov 2014)
New Revision: 63267

Modified:
   grass/trunk/gui/wxpython/vdigit/preferences.py
Log:
vdigit: settings cancel button does not cancel anything, it just closes the dialog

Modified: grass/trunk/gui/wxpython/vdigit/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/preferences.py	2014-11-28 20:01:30 UTC (rev 63266)
+++ grass/trunk/gui/wxpython/vdigit/preferences.py	2014-11-28 20:13:23 UTC (rev 63267)
@@ -48,7 +48,7 @@
 
         # buttons
         btnApply = wx.Button(self, wx.ID_APPLY)
-        btnCancel = wx.Button(self, wx.ID_CANCEL)
+        btnCancel = wx.Button(self, wx.ID_CLOSE)
         btnSave = wx.Button(self, wx.ID_SAVE)
         btnSave.SetDefault()
 
@@ -62,16 +62,18 @@
         btnCancel.SetToolTipString(_("Close dialog and ignore changes"))
         
         # sizers
-        btnSizer = wx.StdDialogButtonSizer()
-        btnSizer.AddButton(btnCancel)
-        btnSizer.AddButton(btnApply)
-        btnSizer.AddButton(btnSave)
-        btnSizer.Realize()
+        btnSizer = wx.wx.BoxSizer(wx.HORIZONTAL)
+        btnSizer.Add(btnCancel, proportion = 0,
+                     flag = wx.ALIGN_RIGHT | wx.ALL, border = 5)
+        btnSizer.Add(btnApply, proportion = 0,
+                     flag = wx.ALIGN_RIGHT | wx.ALL, border = 5)
+        btnSizer.Add(btnSave, proportion = 0,
+                     flag = wx.ALIGN_RIGHT | wx.ALL, border = 5)
         
         mainSizer = wx.BoxSizer(wx.VERTICAL)
         mainSizer.Add(item = notebook, proportion = 1, flag = wx.EXPAND | wx.ALL, border = 5)
         mainSizer.Add(item = btnSizer, proportion = 0,
-                      flag = wx.EXPAND | wx.ALL | wx.ALIGN_CENTER, border = 5)
+                      flag = wx.ALIGN_RIGHT, border = 5)
         
         self.Bind(wx.EVT_CLOSE, self.OnCancel)
         



More information about the grass-commit mailing list