mailr13298 - /branches/gui_testing/gui/analyses/__init__.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 29, 2011 - 15:27:
Author: bugman
Date: Wed Jun 29 15:27:39 2011
New Revision: 13298

URL: http://svn.gna.org/viewcvs/relax?rev=13298&view=rev
Log:
Fix for the Analysis_controller.delete_analysis() method for when the last 
page is deleted.

The gui methods are now called properly and the switch to the previous page 
is not attempted.


Modified:
    branches/gui_testing/gui/analyses/__init__.py

Modified: branches/gui_testing/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/__init__.py?rev=13298&r1=13297&r2=13298&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/__init__.py (original)
+++ branches/gui_testing/gui/analyses/__init__.py Wed Jun 29 15:27:39 2011
@@ -141,8 +141,8 @@
         # Decrement the number of analyses.
         self._num_analyses -= 1
 
-        # The current page has been deleted, so switch one back.
-        if index == self._current:
+        # The current page has been deleted, so switch one back (if 
possible).
+        if index == self._current and self._current != 0:
             # Decrement.
             self._current -= 1
 
@@ -157,11 +157,11 @@
             self._current = None
 
             # Delete the previous sizer.
-            old_sizer = self.GetSizer()
+            old_sizer = self.gui.GetSizer()
             old_sizer.DeleteWindows()
 
             # Recreate the start screen.
-            self.add_start_screen()
+            self.gui.add_start_screen()
 
 
     def get_page_from_name(self, name):




Related Messages


Powered by MHonArc, Updated Wed Jun 29 15:40:02 2011