Modify

Opened 6 years ago

Closed 6 years ago

#201 closed defect (fixed)

SelectionListener is called twice on selection

Reported by: Christof Dallermassl Owned by: josm@…
Priority: minor Component: Core
Version: latest Keywords: development listener
Cc:

Description (last modified by imi)

The DataSet SelectionChangedListener.selectionChanged is invoked twice when the user selects a node: first the selection is cleared (and the SelectionChangedListener informed) and then the selected node is added and the SelectionChangedListener is informed.

Problem is in DataSet:

	public void setSelected(Collection<? extends OsmPrimitive> selection) {
		clearSelection(); // here the listener is informed
		for (OsmPrimitive osm : selection)
			osm.selected = true;
		fireSelectionChanged(selection); // here the listener is informed
	}

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by imi

  • Description modified (diff)

comment:2 Changed 6 years ago by imi

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.