Comment 3 for bug 730180

Revision history for this message
Sibi Antony (sibi-antony) wrote :

I would suggest to keep the timerate setting and script pausing separate for mainly 2 reasons. One, the user might expect the script to resume from pausing with last known timerate - which requires to remember the last timerate etc.

Second - Currently, the script rate changes are performed (setScriptRate()) relying on the wait() used inside a script. i.e. on an assumption that the script uses wait() calls and thereby tweaking the wait() time. However, this is not good for pause, since for lengthy scripts which doesn't use wait() at all, the pause will never happen. A better approach is to identify each script statement execution and once a gui pause event is received, intercept the script execution.

So we can keep the timerate and script pausing separate for now, unless until it is really necessary.
For a user who wishes to pause a script, I am implementing a script pausing based on QScriptEngineAgent. We can have a keyboard shortcut to map this to pause/play scripts - much like in old Stellarium versions (0.9.1)