Author: bugman Date: Thu Jun 7 15:32:20 2012 New Revision: 16726 URL: http://svn.gna.org/viewcvs/relax?rev=16726&view=rev Log: The wizard now has an on_back() method available to perform actions when going back. The on_next() method has been fixed in that it is called even when the page is skipped. Modified: branches/uf_redesign/gui/wizard.py Modified: branches/uf_redesign/gui/wizard.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/wizard.py?rev=16726&r1=16725&r2=16726&view=diff ============================================================================== --- branches/uf_redesign/gui/wizard.py (original) +++ branches/uf_redesign/gui/wizard.py Thu Jun 7 15:32:20 2012 @@ -285,6 +285,13 @@ """ + def on_back(self): + """To be over-ridden if an action is to be performed just before moving back to the previous page. + + This method is called when moving back to the previous page of the wizard. + """ + + def on_completion(self): """To be over-ridden if an action is to be performed just after executing self.on_execute(). @@ -618,6 +625,9 @@ @type event: wx event """ + # Execute the page's on_next() method. + self._pages[self._current_page].on_back() + # Work back in the sequence. self._current_page = self._seq_prev[self._current_page] @@ -632,11 +642,11 @@ @type event: wx event """ + # Execute the page's on_next() method. + self._pages[self._current_page].on_next() + # Operations for non-skipped pages. if not self._skip_flag[self._current_page]: - # Execute the page's on_next() method. - self._pages[self._current_page].on_next() - # Execute the page's on_execute() method (via the _apply() method). if self._exec_on_next[self._current_page]: self._pages[self._current_page]._apply(event)