[GRASS-SVN] r51939 - grass/branches/releasebranch_6_4/gui/wxpython/dbmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jun 2 09:00:24 PDT 2012
Author: martinl
Date: 2012-06-02 09:00:24 -0700 (Sat, 02 Jun 2012)
New Revision: 51939
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/manager.py
grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/sqlbuilder.py
Log:
wxGUI/dbmgr: apply query when closing SQL builder
(merge r51937 from trunk)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/manager.py 2012-06-02 15:58:45 UTC (rev 51938)
+++ grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/manager.py 2012-06-02 16:00:24 UTC (rev 51939)
@@ -2034,7 +2034,7 @@
self.builder = SQLFrame(parent = self, id = wx.ID_ANY,
title = _("SQL Builder"),
vectmap = self.vectorName,
- evtheader = self.OnBuilderEvt)
+ evtHandler = self.OnBuilderEvt)
self.builder.Show()
else:
self.builder.Raise()
@@ -2043,6 +2043,10 @@
if event == 'apply':
sqlstr = self.builder.GetSQLStatement()
self.FindWindowById(self.layerPage[self.layer]['statement']).SetValue(sqlstr)
+ # apply query
+ self.listOfSQLStatements.append(sqlstr)
+ self.OnApplySqlStatement(None)
+ # close builder on apply
if self.builder.CloseOnApply():
self.builder = None
elif event == 'close':
Modified: grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/sqlbuilder.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/sqlbuilder.py 2012-06-02 15:58:45 UTC (rev 51938)
+++ grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/sqlbuilder.py 2012-06-02 16:00:24 UTC (rev 51939)
@@ -37,7 +37,7 @@
class SQLFrame(wx.Frame):
"""!SQL Frame class"""
def __init__(self, parent, title, vectmap, id = wx.ID_ANY,
- layer = 1, qtype = "select", evtheader = None):
+ layer = 1, qtype = "select", evtHandler = None):
wx.Frame.__init__(self, parent, id, title)
@@ -45,7 +45,7 @@
wx.BITMAP_TYPE_ICO))
self.parent = parent
- self.evtHeader = evtheader
+ self.evtHandler = evtHandler
#
# variables
@@ -401,9 +401,9 @@
def OnApply(self, event):
"""Apply button pressed"""
- if self.evtHeader:
- self.evtHeader(event = 'apply')
-
+ if self.evtHandler:
+ self.evtHandler(event = 'apply')
+
if self.close_onapply.IsChecked():
self.Destroy()
@@ -435,8 +435,8 @@
def OnClose(self, event):
"""!Close button pressed"""
- if self.evtHeader:
- self.evtHeader(event = 'close')
+ if self.evtHandler:
+ self.evtHandler(event = 'close')
self.Destroy()
More information about the grass-commit
mailing list