Author: bugman Date: Wed Jun 15 14:52:25 2011 New Revision: 13038 URL: http://svn.gna.org/viewcvs/relax?rev=13038&view=rev Log: A question dialog now appears before loading a save state if the GUI is not in the initial state. This is just a warning that all data would be lost. Modified: branches/gui_testing/gui/relax_gui.py Modified: branches/gui_testing/gui/relax_gui.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/relax_gui.py?rev=13038&r1=13037&r2=13038&view=diff ============================================================================== --- branches/gui_testing/gui/relax_gui.py (original) +++ branches/gui_testing/gui/relax_gui.py Wed Jun 15 14:52:25 2011 @@ -550,6 +550,15 @@ @type event: wx event """ + # Warning. + if not self.init_state: + # The message. + msg = "Loading a saved relax state file will cause all unsaved data to be lost. Are you sure you would to open a save file?" + + # The dialog. + if not question(msg, default=True): + return + # Open the dialog. filename = openfile(msg='Select file to open', filetype='state.bz2', default='relax save files (*.bz2)|*.bz2|all files (*.*)|*.*')