if (redoCommands.isEmpty())
return;
Collection<? extends OsmPrimitive> oldSelection = Main.main.getCurrentDataSet().getSelected();
for (int i=0; i<num; ++i) {
final Command c = redoCommands.removeFirst();
c.executeCommand();
commands.add(c);
if (redoCommands.isEmpty()) {
break;
}
}