Bug 96 - Remember zoom level of the simulator when updating
Summary: Remember zoom level of the simulator when updating
Status: RESOLVED FIXED
Alias: None
Product: UPPAAL
Classification: Unclassified
Component: GUI (show other bugs)
Version: 3.5.7
Hardware: All All
: P1 enhancement
Assignee: Robert Olesen
URL:
Depends on:
Blocks:
 
Reported: 2004-03-31 02:15 CEST by arnaud
Modified: 2006-02-27 19:12 CET (History)
2 users (show)

See Also:
Architecture:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arnaud 2004-03-31 02:15:56 CEST
After changing the system in the editor when going back to the simulator.
Updating the view of the automatas take the zoom level back to the default value
(which seems to be 75% ?).
So I need to readjust the zoom level after each system change which is quite
tedious.

Ok it's almost nothing but it shouldn't be hard to fix either :-)
Comment 1 Gerd Behrmann 2004-03-31 14:11:17 CEST
Well, this is actually the fix for bug 52. That bug wanted the zoom level to 
switch back to the default when opening a new system. Now from the point of the 
simulator, you never open new systems: You only upload a new system (which 
might be a new version of the same system). So this gives you the behaviour 
that you observe.

I cc: Ulrik on this bug. Ulrik what do you suggest we do to resolve this 
problem?
Comment 2 arnaud 2004-04-02 04:54:45 CEST
IMHO I think that the average user spends most of his time with "S**t it's
deadlocked. Let's change xxxx and see what happens" rather than loading
different models from source (I mean one who is *really* using Uppal not just
testing to see if he want to do something with it).
So if it were a problem of "one or the other" I think that reminding the zoom
level would be more usefull.

But maybe the action of loading a file could set a flag for reinitializing to
the default zoom-level/view-settings when swapping later to the simulation ?
Comment 3 Ulrik Nyman 2004-04-02 09:49:21 CEST
I agree that it is very annoying  if one has to set the zoom level every time
when switching from the editor to the simulator. Thus the previous suggestion of
setting a flag when a new model is loaded such that the simulator can change the
zoom level to the default seems as a good idea.
Comment 4 Gerd Behrmann 2004-04-02 11:58:11 CEST
Ok, I will see what I can do when I'm back at the university after easter. 
Comment 5 Gerd Behrmann 2004-04-27 10:18:48 CEST
I have reopened bug 52, since that bug is not at all about the simulator.  The
behaviour described here (bug 96) is not new to version 3.4.5 and thus not a
side effect of the "fix" for bug 52.

In fact, bug 96 (this bug) is one aspect of a more complicated bug, namely that
the simulator does not remember anything at all when the system has been
changed, i.e. the zoom level is lost and information about visible processes and
variables are lost.

Fixing this is not trivial: Obviously these things need to be reset whenever a
new model is loaded into the editor (from file). On the other hand, the
information should be retained when the same model is changed, except when the
changes are so radical that this does not make sence (i.e. when replacing one
process with another one).

I will not fix this in the 3.4 series, but it should be fixed in 3.5
Comment 6 Gerd Behrmann 2004-06-04 09:40:32 CEST
Changed severity to enhancement.
Comment 7 Gerd Behrmann 2005-06-29 21:11:37 CEST
Moving bug to 3.5.7, as this is an enhancement bug and only bug fixes are allowed on 3.4.
Comment 8 Gerd Behrmann 2006-02-03 13:17:34 CET
Robert, could you take a look at this issue? Thanks.
Comment 9 Robert Olesen 2006-02-03 15:05:55 CET
Sure.
Comment 10 Robert Olesen 2006-02-26 21:57:01 CET
Zoomlevel is now remembered when the same system is viewed in the simulator
where there were no dimentional changes. If it is a new system, the zoom level
is reset and the offset is set to (0,0).
Comment 11 Robert Olesen 2006-02-27 19:12:18 CET
It appeared that my last fix had some problems. I have comitted a new fix which
takes care of:
remembering visibility information for each process
remembering zoom information for each process
removed unecessary newSystemFlag
resets visibility and zoom information on dramatic changes in terms of any
change that made the model bounds change.