Ticket #1336 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

Drawing Tools interact with Overlays

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b8-analysis
Component: Tools Version:
Severity: serious Keywords:
Cc: rob.vanthof@… Blocked By:
Blocking: #1457


In the ImageJ mailing list Rob van 't Hof reported the following issue with beta 3:

"When drawing within a selection, the selection is moved around by the drawing action."

To duplicate open boats, draw a rect overlay, select brush tool, and draw within overlay. The drawing works correctly but the overlay moves around while drawing and ends up in a new position.

Change History

comment:1 Changed 8 years ago by bdezonia

  • Blocking 1345 added

comment:2 Changed 8 years ago by bdezonia

  • Owner changed from bdezonia to dscho
  • Status changed from new to assigned

After some debugging this seems to be related to how we have a JHotDraw oriented ToolDelegator class and a IJ2 oriented DefaultToolService. Both of them deal with passing events around from tools to interested listeners but one works in Swing event space and one works in IJ2's event space. I think the events are getting handled twice. ToolDelegator says the selection tool is active and handles those events by dragging the overlay figure. At the same time I think DefaultToolService says the active tool is Pencil for instance and handles the IJ2 events by changing pixel data. Fixing might be as simple as not turning on the selection tool in the ToolDelegator in certain cases but I haven't found the correct cases when this should happen. Johannes, can you look at this a bit?

comment:3 Changed 8 years ago by dscho

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5

comment:4 Changed 8 years ago by bdezonia

  • Blocking 1457 added; 1345 removed

comment:5 Changed 7 years ago by curtis

  • Milestone changed from imagej-2.0.0-beta6 to imagej-2.0.0-beta7

comment:6 Changed 7 years ago by bdezonia

  • Owner changed from dscho to bdezonia

comment:7 Changed 7 years ago by bdezonia

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

Fixed with commit beb6feaa76f2fcb09a2287e7e9d555a4486c7cea

Note: See TracTickets for help on using tickets.