Opened 9 years ago

Closed 5 years ago

#14 closed defect (fixed)

Don't reset zoom state when loading if old and new image size is the same.

Reported by: finticemo Owned by: Thomas Bernard
Priority: major Milestone: 2.7
Component: GrafX2 Version: 2.4
Keywords: Cc:

Description

I believe the title is fairly self-explanatory.

I was working on a large set of 32x32 icons and doing a lot of load / save.
Each time I loaded, the zoom display was removed and I had to hit M to bring it up again.
It would be more convenient if GrafX2 preserves the zoom state in the case where the newly loaded image is the same size as the previous image.

Change History (8)

comment:1 by Thomas Bernard, 7 years ago

it can even preserve zoom state upon file load what ever the image size is...

comment:2 by PulkoMandy, 6 years ago

Milestone: 2.52.6

comment:3 by PulkoMandy, 6 years ago

Owner: changed from Adrien Destugues to PulkoMandy
Status: newassigned

comment:4 by PulkoMandy, 5 years ago

Milestone: 2.62.7

Move open tickets to 2.7 milestone

comment:5 by Thomas Bernard, 5 years ago

Owner: changed from PulkoMandy to Thomas Bernard

here is the code that reset the magnifier mode after loading :
https://gitlab.com/GrafX2/grafX2/blob/master/src/buttons.c#L3279
I don't know why it is done that way.
it is probably to avoid redrawing bugs...

comment:6 by PulkoMandy, 5 years ago

Yes, various things can go bad if the magnifier is kept when reloading a picture:

  • The magnifier position (x,y in the image) has to be clipped to the new picture size (there can be problems if the magnified picture does not fill the display completely to the right)
  • The separator bar position needs to be recomputed too (the magnified area must always be completely visible in the 1:1 side as well)

Possibly some other state is also reset elsewhere.

comment:8 by Thomas Bernard, 5 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.