Ticket #1346 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Image label not up to date

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b4-plugins
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1345

Description (last modified by bdezonia) (diff)

Create a new image
Add a channel axis (size 9)
Image displays fine
Now click on slider arrow as far right as possible
Image label stops on 8/9
Click on left slider arrow and it goes to 9/9
Subsequent clicks will go down to 2/9 but no farther
Click on right slider arrow and it goes to 1/9
Repeat ad nauseum and this issue never rights itself
(Again this may be a publish() versus publishNow() issue with the image label)

Change History

comment:1 Changed 8 years ago by bdezonia

  • Description modified (diff)

comment:2 Changed 8 years ago by bdezonia

I understand this bug. There are two places that are handling AxisPositionEvents: AbstractImageDisplayViewer and SwingDisplayPanel. This bug happens because the event is getting processed by the viewer first and the panel second. This order needs to be reversed. I think order is determined somewhat randomly at startup.

A short term fix is to make AbstractImageDisplayViewer::updateLabel() public and have the SwingDisplayPanel AxisPosiitonEvent handler call it directly. This is kludgy but solves the problem.

Ideally we'd come up with a way to specify who has priority in handling certain events at creation time.

comment:3 Changed 8 years ago by bdezonia

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

With commit fc0fff575dfc4a2dd04b9fe52ad8fcb6594d3b26 this bug is fixed. We are now processing AxisPositionEvents in two steps. This keeps the classes loosely coupled and still solves the bug.

Note: See TracTickets for help on using tickets.