Skip to content

Commit

Permalink
wxGUI dbmgr: Fix dbmgr widgets layout on the wxMSW (#637)
Browse files Browse the repository at this point in the history
* wxGUI dbmgr: fix sql simple where sizer widgets layout on the wxMSW

* wxGUI dbmgr: fix ComboBox widget vertical position on the wxMSW
  • Loading branch information
tmszi committed May 15, 2020
1 parent b243fbe commit cb66bdf
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions gui/wxpython/dbmgr/base.py
Expand Up @@ -61,8 +61,8 @@
from core.debug import Debug
from dbmgr.dialogs import ModifyTableRecord, AddColumnDialog
from core.settings import UserSettings
from gui_core.wrap import SpinCtrl, Button, TextCtrl, ListCtrl, CheckBox, \
StaticText, StaticBox, Menu, NewId
from gui_core.wrap import Button, CheckBox, ComboBox, ListCtrl, Menu, \
NewId, SpinCtrl, StaticBox, StaticText, TextCtrl
from core.utils import cmp

if sys.version_info.major >= 3:
Expand Down Expand Up @@ -1208,9 +1208,9 @@ def AddLayer(self, layer, pos=-1):
parent=simpleSqlPanel,
id=wx.ID_ANY,
name='wherePanel')
sqlWhereColumn = wx.ComboBox(
sqlWhereColumn = ComboBox(
parent=whereSimpleSqlPanel, id=wx.ID_ANY, size=(150, -1),
style=wx.CB_SIMPLE | wx.CB_READONLY,
style=wx.CB_READONLY,
choices=self.dbMgrData['mapDBInfo'].GetColumns(
self.dbMgrData['mapDBInfo'].layers[layer]['table']))
sqlWhereColumn.SetSelection(0)
Expand Down Expand Up @@ -1262,16 +1262,16 @@ def AddLayer(self, layer, pos=-1):

sqlSimpleWhereSizer.Add(
sqlWhereColumn,
flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
border=3)
sqlSimpleWhereSizer.Add(
sqlWhereCond,
flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
border=3)
sqlSimpleWhereSizer.Add(
sqlWhereValue,
proportion=1,
flag=wx.EXPAND | wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT,
border=3)
whereSimpleSqlPanel.SetSizer(sqlSimpleWhereSizer)
simpleSqlSizer.Add(sqlLabel, border=5, pos=(0, 0),
Expand Down Expand Up @@ -2384,9 +2384,9 @@ def AddLayer(self, layer, pos=-1):
label=" %s " % _("Rename column"))
renameSizer = wx.StaticBoxSizer(renameBox, wx.HORIZONTAL)

columnFrom = wx.ComboBox(
columnFrom = ComboBox(
parent=panel, id=wx.ID_ANY, size=(150, -1),
style=wx.CB_SIMPLE | wx.CB_READONLY,
style=wx.CB_READONLY,
choices=self.dbMgrData['mapDBInfo'].GetColumns(table))
columnFrom.SetSelection(0)
self.layerPage[layer]['renameCol'] = columnFrom.GetId()
Expand Down Expand Up @@ -3276,9 +3276,9 @@ def _createDeletePage(self):
label = StaticText(parent=self.deletePanel, id=wx.ID_ANY,
label='%s:' % _("Layer to remove"))

self.deleteLayer = wx.ComboBox(
self.deleteLayer = ComboBox(
parent=self.deletePanel, id=wx.ID_ANY, size=(100, -1),
style=wx.CB_SIMPLE | wx.CB_READONLY,
style=wx.CB_READONLY,
choices=list(map(str, self.mapDBInfo.layers.keys())))
self.deleteLayer.SetSelection(0)
self.deleteLayer.Bind(wx.EVT_COMBOBOX, self.OnChangeLayer)
Expand Down Expand Up @@ -3351,9 +3351,9 @@ def _createModifyPage(self):
self.modifyLayerWidgets = {'layer':
(StaticText(parent=self.modifyPanel, id=wx.ID_ANY,
label='%s:' % _("Layer")),
wx.ComboBox(parent=self.modifyPanel, id=wx.ID_ANY,
ComboBox(parent=self.modifyPanel, id=wx.ID_ANY,
size=(100, -1),
style=wx.CB_SIMPLE | wx.CB_READONLY,
style=wx.CB_READONLY,
choices=list(map(str,
self.mapDBInfo.layers.keys())))),
'driver':
Expand Down

0 comments on commit cb66bdf

Please sign in to comment.