Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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 bastiK)

  1. Select more that 20 objects on a map
  2. Move them a bit (and click "yes" in "Are you sure?" window)
  3. 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)

patch.diff (574 bytes ) - added by Don-vip 13 years ago.

Download all attachments as: .zip

Change History (9)

by Don-vip, 13 years ago

Attachment: patch.diff added

comment:1 by Don-vip, 13 years ago

Summary: Dragging map is considered moving objects[Patch] Dragging map is considered moving objects

Easily reproduced. I don't know if my patch is the best solution, but it fixes this issue without any visible side effect.

comment:2 by malenki, 13 years ago

Cc: malenki added

Confirm.
It doesn't matter if you click yes or no. Both ways JOSM falsely assumes you moved the objects.

comment:3 by Don-vip, 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 rickmastfan67, 13 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
Last edited 13 years ago by rickmastfan67 (previous) (diff)

comment:5 by bastiK, 13 years ago

Description: modified (diff)

Why should it be platform dependent? Patch seems to work for me (Ubuntu Linux).

in reply to:  5 ; comment:6 by Don-vip, 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:7 by Don-vip, 13 years ago

Resolution: fixed
Status: newclosed

In [4509/josm]:

fix #6890 - Dragging map is considered moving objects

in reply to:  6 comment:8 by bastiK, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.