Opened 18 years ago

Last modified 18 years ago

#201 closed defect

SelectionListener is called twice on selection — at Version 1

Reported by: Christof Dallermassl <cdaller.hw@…> Owned by: josm@…
Priority: minor Milestone:
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
	}

Change History (1)

comment:1 by imi, 18 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.