Ticket #1168 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Can no longer set background color using picker tool

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b3-headless
Component: Tools Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

You used to be able to set the BG values by right clicking on an image with the picker tool active. Now the context menu comes up instead. Though one can set FG values just fine it is now impossible to set BG values using the picker tool.

(Curtis, if this is a result of recent work that you can fix quickly please take. Otherwise assign back to me.)

Change History

comment:1 Changed 7 years ago by curtis

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

You can avoid the ContextMenuHandler picking up the right clicks by adding the following code to PickerTool:

	@Override
	public void onMouseDown(final MsPressedEvent evt) {
		// do not let anything else handle mouse presses
		evt.consume();
	}

	@Override
	public void onMouseUp(final MsReleasedEvent evt) {
		// do not let anything else handle mouse releases
		evt.consume();
	}

However, there is another problem in that PickerTool.onMouseClick currently does not do anything in response to right clicks. Rather, it sets the BG value when the Alt key is held.

Lastly, I noticed that PickerTool detects the Alt key by overriding onKeyDown and onKeyUp. You shouldn't need to do this; you should be able to call evt.getModifiers().isAltDown() on the MsEvent directly. Please let me know if this does not work.

Last edited 7 years ago by curtis (previous) (diff)

comment:2 Changed 7 years ago by bdezonia

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

comment:3 Changed 7 years ago by bdezonia

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta3

In commit c1cf7fb63d05bdfbe11e3fbfd2b7b4ef8c47a11b used standard methods for tracking ALT key status.

There really is nothing else left of this ticket.

Note: See TracTickets for help on using tickets.