Changes between Version 1 and Version 2 of Ticket #6447, comment 7
- Timestamp:
- 2011-10-16T11:11:48+02:00 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6447, comment 7
v1 v2 1 1 This is a duplicate of #4991. I worked on a fix for the latter, but the result is similar to olejorgenb’s patch. I believe option #4 would be the cleanest solution, but only expose MoveCommand.getLayer. 2 2 3 Option #1 has the disadvantage of changing JOSM behaviour and it’s not clear it would improve the situation (I know applications where the undo is this fine-grained. It’s annoying to have to hit undo five times before your action is actually undone. If this is really is an issue, this should be solved outside of this bug)3 Option *1 has the disadvantage of changing JOSM behaviour and it’s not clear it would improve the situation (I know applications where the undo is this fine-grained. It’s annoying to have to hit undo five times before your action is actually undone. If this is really is an issue, this should be solved outside of this bug) 4 4 5 Option #2: I agree all nodes are likely to belong to the same data set, but we’d have to assert that. This is true as well for option #4, at least unless there’s some kind of check added that returns <null> if the nodes are on multiple layers (or data sets).5 Option *2: I agree all nodes are likely to belong to the same data set, but we’d have to assert that. This is true as well for option #4, at least unless there’s some kind of check added that returns <null> if the nodes are on multiple layers (or data sets). 6 6 7 Option #3: sounds overcomplicated, given that all information we need is already stored elsewhere.7 Option *3: sounds overcomplicated, given that all information we need is already stored elsewhere. 8 8 9 9 10 10 In the current form it takes O(n²) comparisons. Only asserting all items in each collection have the same data set and that these data sets are the same would bring it down to O(2n). This is a lot better, but still feels wrong given that this is executed each mouse move while dragging. It probably doesn’t matter, because n is reasonably small. 11 11 12 Still, I’d vote to go with #4 and enforce the same data set policy in MoveCommand’s constructor (throw an exception on error). I doubt there are any callers in JOSM that pass multi-data-set primitives to the move command, so this should be fine.12 Still, I’d vote to go with *4 and enforce the same data set policy in MoveCommand’s constructor (throw an exception on error). I doubt there are any callers in JOSM that pass multi-data-set primitives to the move command, so this should be fine. 13 13 14 14 Comments?


