NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #713 (closed defect: fixed)

Opened 2011-08-02T15:51:15-05:00

Last modified 2011-09-21T17:59:27-05:00

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 2011-09-21T17:59:27-05:00 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@…>