[josm-dev] How to get selected relations in JOSM?

Dirk Stöcker openstreetmap at dstoecker.de
Mon Jul 7 11:44:59 UTC 2014


On Sat, 5 Jul 2014, Jochen Willig wrote:

> I am developing a Plugin to set automatically a relation with other selected
> relations. Therefore I thought I can use the method getSelectedRelations().
> Unfortunatley it returns nothing. The method getRelations() returns all
> relations in the data set.
>
> Does anyone has an idea why this is not working or a hint how to do it
> differently?

Maybe you mix "selected" and "selected in relation list"? As relations are
somewhat special they also have two selected states. One when selected in
the normal selection (you cannot click them, so you need indirect methods
like search) and one selection in the overview of relations.

Ciao
-- 
http://www.dstoecker.eu/ (PGP key available)



More information about the josm-dev mailing list