[GRASS-SVN] r57757 - grass/trunk/gui/wxpython/animation
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 19 22:26:55 PDT 2013
Author: annakrat
Date: 2013-09-19 22:26:55 -0700 (Thu, 19 Sep 2013)
New Revision: 57757
Modified:
grass/trunk/gui/wxpython/animation/controller.py
grass/trunk/gui/wxpython/animation/dialogs.py
Log:
wxGUI/animation: only hide export dialog to keep values there
Modified: grass/trunk/gui/wxpython/animation/controller.py
===================================================================
--- grass/trunk/gui/wxpython/animation/controller.py 2013-09-20 05:08:33 UTC (rev 57756)
+++ grass/trunk/gui/wxpython/animation/controller.py 2013-09-20 05:26:55 UTC (rev 57757)
@@ -71,6 +71,8 @@
self.timeTick = 200
+ self._dialogs = {}
+
def SetAnimationToolbar(self, toolbar):
self.animationToolbar = toolbar
@@ -458,18 +460,17 @@
if not self.animationData:
GMessage(parent = self.frame, message = _("No animation to export."))
return
- dlg = ExportDialog(self.frame, temporal = self.temporalMode,
- timeTick = self.timeTick, visvis = hasVisvis)
- if dlg.ShowModal() == wx.ID_OK:
- decorations = dlg.GetDecorations()
- exportInfo = dlg.GetExportInformation()
- dlg.Destroy()
+
+ if 'export' in self._dialogs:
+ self._dialogs['export'].Show()
+ self._dialogs['export'].Raise()
else:
- dlg.Destroy()
- return
-
- self._export(exportInfo, decorations)
-
+ dlg = ExportDialog(self.frame, temporal=self.temporalMode,
+ timeTick=self.timeTick, visvis=hasVisvis)
+ dlg.doExport.connect(self._export)
+ self._dialogs['export'] = dlg
+ dlg.Show()
+
def _export(self, exportInfo, decorations):
size = self.frame.animationPanel.GetSize()
if self.temporalMode == TemporalMode.TEMPORAL:
Modified: grass/trunk/gui/wxpython/animation/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/animation/dialogs.py 2013-09-20 05:08:33 UTC (rev 57756)
+++ grass/trunk/gui/wxpython/animation/dialogs.py 2013-09-20 05:26:55 UTC (rev 57757)
@@ -854,6 +854,9 @@
self.visvis = visvis
self._layout()
+ # export animation
+ self.doExport = Signal('ExportDialog::doExport')
+
wx.CallAfter(self._hideAll)
def _layout(self):
@@ -1258,8 +1261,11 @@
GError(parent = self, message = _("Export file is missing."))
return
- self.EndModal(wx.ID_OK)
-
+ # hide only to keep previous values
+ self.Hide()
+ self.doExport.emit(exportInfo=self.GetExportInformation(),
+ decorations=self.GetDecorations())
+
def GetDecorations(self):
return self.decorations
More information about the grass-commit
mailing list