Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 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 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by Don-vip

Attachment: patch.diff added

comment:1 Changed 8 years ago by Don-vip

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 Changed 8 years ago by malenki

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 Changed 8 years ago by Don-vip

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 Changed 8 years ago by rickmastfan67

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 8 years ago by rickmastfan67 (previous) (diff)

comment:5 Changed 8 years ago by bastiK

Description: modified (diff)

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

comment:6 in reply to:  5 ; Changed 8 years ago by 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 :)

comment:7 Changed 8 years ago by Don-vip

Resolution: fixed
Status: newclosed

In [4509/josm]:

fix #6890 - Dragging map is considered moving objects

comment:8 in reply to:  6 Changed 8 years ago by bastiK

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.