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

Dirk Stöcker openstreetmap at dstoecker.de
Tue Jan 4 18:03:59 GMT 2011


On Tue, 4 Jan 2011, Flávio Henrique wrote:

> It worked but remains one problem: after running
>
> Main.main.undoRedo.add(new SequenceCommand(tr("Your job"), cmds));
>
> I can see the combined way on GUI (before there was 24 segments, after 23.
> Nice). But after selecting the data again, the
> method nc.getCurrentDataSet().getWays() returns the same ways (24 segments).
> Seems I need to remove the combined segment from dataSet. How can I do that?

I think you still have a bug. The UndoRedo work basically like this: It 
describes a transformation from one state to another. When you implemented 
it correct, then the state needs to change. Please check, that the Actions 
you do really are done. Open the Command history and view it. 
For SequenceCommands you can view them like a tree and it needs to contain 
any action necessary to combine ways (including a delete for removed 
parts).

But it is a long time since I last did this, so I may miss something. Best 
help is always the source code itself. See the Actions inside of JOSm and 
compare what they do different from the stuff you do.

Also Do the data set check (should be in help menu). It can detect errors 
in the composition of datasets.

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


More information about the josm-dev mailing list