Ticket #713 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Zoom to selection is broken

Reported by: bdezonia Owned by: curtis
Priority: major Milestone: imagej2-b1-initial
Component: Display API Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

I recently started using the bounds of the current selection for the Zoom to selection plugin. But it seems to always zoom somewhere near the upper left corner. This is probably related to the zooming bugs.

Change History

comment:1 Changed 8 years ago by dscho

  • Status changed from new to closed
  • Resolution set to fixed

(In [3963]) Fix ticket 713

Zoom to selection was broken because the JScrollPane's viewport was not
given a chance to update its dimension, and therefore the request to set
the origin correctly was denied, defaulting to (0,0).

Since changing the zoom also resets the offset, we have to remember the
pan offset and tell CanvasHelper to reset it after validating the
JScrollPane's viewport.

Signed-off-by: Johannes Schindelin <johannes.schindelin@…>

Note: See TracTickets for help on using tickets.