Commit c93640df authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Complete reset simulation buttton

parent 65e35694
......@@ -10,6 +10,7 @@ __url__ = "http://taste.tuxfamily.org"
# maxime.perrotin@esa.int
import os
import traceback
import signal
import sys
import platform
......@@ -326,8 +327,9 @@ def gui():
sdl.msc_macro_start.connect(msc.start_undo_macro)
sdl.msc_macro_stop.connect(msc.stop_undo_macro)
sdl.allowed_messages.connect(myWidget.allowed_editors)
except IOError:
log.info('SDL viewer not available')
except IOError as err:
log.info('SDL viewer not available - ' + str(err))
log.info(traceback.format_exc())
sdl = None
else:
sdlButton = toolbar.addAction('SDL')
......
......@@ -2,7 +2,7 @@
# Resource object code
#
# Created: Thu Jan 22 14:09:27 2015
# Created: Wed Feb 18 11:29:38 2015
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
......
......@@ -199,9 +199,10 @@ class sdlHandler(QObject):
return False
def reset_simulation(self):
''' Jump to the first step of simulation '''
self.restore_global_state(self.init_state)
# TODO: clean log, clean MSC, rewind undo stack
''' Jump back to the first step of simulation '''
while self.undo_stack.canUndo():
self.undo()
self.log_area.clear()
def undo(self):
''' Called when the undo button is pressed '''
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment