[josm-dev] How to update changes in dataSet ?

Sebastian Klein bastikln at googlemail.com
Mon Jan 10 11:59:26 GMT 2011


Dirk Stöcker wrote:
> On Tue, 4 Jan 2011, Flávio Henrique wrote:
> 
>> One question that could clarify many things for me:
>>
>> after calling Main.main.undoRedo.add(new SequenceCommand(tr("My job"),
>> cmds)), a new calling for method:
>> nc.getCurrentDataSet().getWays() should return the combined ways (without
>> the original ones)?
> 
> I think so, yes. But I'm not sure. Maybe that is a parallel thread and 
> thus asynchroneus. Some of these who had a deeper look into these 
> structures lately (Jiri, Sebastion, Upliner) probably know better.

 From memory, I would say it happens all in one thread, so there cannot 
be an issue with parallel execution. Why do you think, 
nc.getCurrentDataSet().getWays() returns ways from the previous dataSet? 
This sounds strange, there is only one dataSet at a given time. (Yes, 
and some positional caching.) Note, that the method will also return 
ways that are deleted, so the number of returned ways does not change in 
this case.

Sebastian



More information about the josm-dev mailing list