[GRASS-SVN] r58433 - grass/trunk/gui/wxpython/animation
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Dec 10 07:39:04 PST 2013
Author: annakrat
Date: 2013-12-10 07:39:03 -0800 (Tue, 10 Dec 2013)
New Revision: 58433
Modified:
grass/trunk/gui/wxpython/animation/controller.py
grass/trunk/gui/wxpython/animation/dialogs.py
Log:
wxGUI/animation: center dialogs on parent
Modified: grass/trunk/gui/wxpython/animation/controller.py
===================================================================
--- grass/trunk/gui/wxpython/animation/controller.py 2013-12-10 12:16:00 UTC (rev 58432)
+++ grass/trunk/gui/wxpython/animation/controller.py 2013-12-10 15:39:03 UTC (rev 58433)
@@ -193,6 +193,7 @@
self.EndAnimation()
dlg = EditDialog(parent=self.frame, evalFunction=self.EvaluateInput,
animationData=self.animationData, maxAnimations=len(self.animations))
+ dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_CANCEL:
dlg.Destroy()
return
@@ -226,6 +227,7 @@
animationIndex = len([anim for anim in self.animations if anim.IsActive()])
animData.SetDefaultValues(windowIndex, animationIndex)
dlg = InputDialog(parent=self.frame, mode='add', animationData=animData)
+ dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_CANCEL:
dlg.Destroy()
return
Modified: grass/trunk/gui/wxpython/animation/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/animation/dialogs.py 2013-12-10 12:16:00 UTC (rev 58432)
+++ grass/trunk/gui/wxpython/animation/dialogs.py 2013-12-10 15:39:03 UTC (rev 58433)
@@ -573,6 +573,7 @@
animationIndex = len(self.animationData)
animData.SetDefaultValues(windowIndex, animationIndex)
dlg = InputDialog(parent=self, mode='add', animationData=animData)
+ dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_CANCEL:
dlg.Destroy()
return
@@ -588,6 +589,7 @@
animData = self.listbox.GetClientData(index)
dlg = InputDialog(parent=self, mode='edit', animationData=animData)
+ dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_CANCEL:
dlg.Destroy()
return
@@ -933,7 +935,7 @@
fontdata.SetInitialFont(font)
dlg = wx.FontDialog(self, fontdata)
-
+ dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_OK:
newfontdata = dlg.GetFontData()
font = newfontdata.GetChosenFont()
@@ -1114,6 +1116,7 @@
dlg = AddTemporalLayerDialog(parent=self, layer=layer)
# first get hidden property, it's altered afterwards
hidden = layer.hidden
+ dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_OK:
layer = dlg.GetLayer()
if hidden:
@@ -1282,6 +1285,7 @@
dlg.layerType.SetSelection(index)
dlg.LoadMapLayers(dlg.GetLayerType(cmd=True),
dlg.mapset.GetStringSelection())
+ dlg.CenterOnParent()
if dlg.ShowModal() == wx.ID_OK:
self.tselect.SetValue(','.join(dlg.GetMapLayers()))
More information about the grass-commit
mailing list