#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 , 14 years ago
Attachment: | patch.diff added |
---|
comment:1 by , 14 years ago
Summary: | Dragging map is considered moving objects → [Patch] Dragging map is considered moving objects |
---|
comment:2 by , 14 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 , 14 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 , 14 years ago
I just want to comment on this bug. On step #2, I can duplicate this when hitting "Undo Move" as well.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2011-10-05 01:31:44 Last Changed Author: Don-vip Revision: 4488 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2011-10-04 13:00:33 +0200 (Tue, 04 Oct 2011) Last Changed Rev: 4488 Identification: JOSM/1.5 (4488 en) Memory Usage: 127 MB / 3640 MB (69 MB allocated, but free) Java version: 1.6.0_27, Sun Microsystems Inc., Java HotSpot(TM) 64-Bit Server VM Operating system: Windows 7
follow-up: 6 comment:5 by , 14 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 , 14 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 , 14 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.