#6890 closed defect (fixed)
[Patch needs review] Dragging map is considered moving objects
Reported by: | Zverikk | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | tested |
Keywords: | move, drag | Cc: | malenki |
Description (last modified by )
- Select more that 20 objects on a map
- Move them a bit (and click "yes" in "Are you sure?" window)
- Drag a map while pressing right mouse button on a selected object.
A confirmation window appears, like you've just dragged all the objects, but if you click "No", previous move action is undone.
Attachments (1)
Change History (9)
by , 13 years ago
Attachment: | patch.diff added |
---|
comment:1 by , 13 years ago
Summary: | Dragging map is considered moving objects → [Patch] Dragging map is considered moving objects |
---|
comment:2 by , 13 years ago
Cc: | added |
---|
Confirm.
It doesn't matter if you click yes or no. Both ways JOSM falsely assumes you moved the objects.
comment:3 by , 13 years ago
Summary: | [Patch] Dragging map is considered moving objects → [Patch needs review] Dragging map is considered moving objects |
---|
I'm not confident with my patch, especially on MacOS. I've only tested it under Windows, would someone test it on other platforms ?
comment:4 by , 13 years ago
I just want to comment on this bug. On step #2, I can duplicate this when hitting "Undo Move" as well.
follow-up: 6 comment:5 by , 13 years ago
Description: | modified (diff) |
---|
Why should it be platform dependent? Patch seems to work for me (Ubuntu Linux).
follow-up: 8 comment:6 by , 13 years ago
Replying to bastiK:
Why should it be platform dependent? Patch seems to work for me (Ubuntu Linux).
I don't know, I have never used a Mac, and this code in MapMover.java let me think this OS does not handle mouse events like any others:
/** * Emulates dragging on Mac OSX */ public void mouseMoved(MouseEvent e) { if (!movementInPlace) return; // Mac OSX simulates with ctrl + mouse 1 the second mouse button hence no dragging events get fired. // Is only the selected mouse button pressed? if (isPlatformOsx()) {
But if you think it's safe, let's try it :)
comment:8 by , 13 years ago
Replying to Don-vip:
Replying to bastiK:
Why should it be platform dependent? Patch seems to work for me (Ubuntu Linux).
I don't know, I have never used a Mac, and this code in MapMover.java let me think this OS does not handle mouse events like any others:
/** * Emulates dragging on Mac OSX */ public void mouseMoved(MouseEvent e) { if (!movementInPlace) return; // Mac OSX simulates with ctrl + mouse 1 the second mouse button hence no dragging events get fired. // Is only the selected mouse button pressed? if (isPlatformOsx()) {But if you think it's safe, let's try it :)
Yeah, hopefully Java has some abstraction for the 2nd & 3rd mouse button simulations on Mac.
Easily reproduced. I don't know if my patch is the best solution, but it fixes this issue without any visible side effect.