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 #861 (closed defect: fixed)

Opened 2011-11-03T11:21:46-05:00

Last modified 2011-11-04T17:13:34-05:00

Zoom out via minus key zooms out twice

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

Description

If you select the zoom tool and then zoom out via the minus key it can zoom out two levels. Using 7237e38d9ea0324823c1e1dfe4cc0400dc5c09b4 I found that the zoom out is getting called twice. It's like the key event is getting handled twice or two key events are getting generated.

Change History

comment:1 Changed 2011-11-03T14:22:55-05:00 by bdezonia

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

Fixed in 3fe52e1d733d107290a2c71bcc20850339376c70.

All keyboard activated zooming done via zoom plugins and not via any handling within the zoom tool.

Behavior change: only '=' and '-' zoom. '+' no longer zooms.

comment:2 Changed 2011-11-03T14:36:26-05:00 by bdezonia

  • Status changed from closed to reopened
  • Resolution fixed deleted

Note current fix does not match IJ1.

IJ1 zooms in/out whenever '-' or '=' are pressed regardless of which key modifiers (such as ctrl or shift) are activated. Match in IJ2.

To match IJ1:

  • remove keyboard accelerators from ZoomIn and ZoomOut plugins.
  • make a listener somewhere that listens for +'s and ='s.
  • have listener invoke the appropriate plugin.

comment:3 Changed 2011-11-04T13:56:58-05:00 by bdezonia

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

This issue is mostly fixed in 3d09cb10dad87c10effa64be517b5c6b92048cd5. Now ='s and -'s will zoom in and out regardless of which modifier keys are down. In order to avoid the occasional double zoom the menu accelerators for the ZoomIn and ZoomOut plugins have been removed. I will open a ticket for separate issue of displaying a keyboard accelerator in the menu but not responding to it twice.

comment:4 Changed 2011-11-04T17:13:34-05:00 by curtis

(In [4283]) Restore accelerators for zoom in and out.

The doubling bug no longer occurs thanks to the event consumption API.

Also see #861.