Modify

Opened 9 years ago

Closed 8 years ago

#5170 closed defect (fixed)

Paste without mouse pointer in draw area should paste to center.

Reported by: NE2 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

Attachments (1)

fix5170.patch (2.3 KB) - added by xeen 8 years ago.
I’ll commit after stabilization because the new behaviour might be confusing for people.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 9 years ago by bastiK

Resolution: fixed
Status: newclosed

You can copy it to a new layer and then merge the layer back.

comment:2 Changed 9 years ago by NE2

Priority: normalminor
Resolution: fixed
Status: closedreopened

Ah - I guess that works. Still, is there any reason duplicate doesn't keep it in the same place?

comment:3 Changed 9 years ago by NE2

Priority: minornormal

Now wait a second - that doesn't work. I merged selection to a new layer, made some tag edits, and merged back, and now it's giving me conflicts because it sees them as the same ways.

comment:4 Changed 9 years ago by NE2

Well, OK, I guess copy-paste rather than merge selection works. It's still counterintuitive.

comment:5 Changed 9 years ago by skyper

Resolution: worksforme
Status: reopenedclosed

It works. You only have to zoom/focus on the original way and then duplicate.

Have a look at josm.openstreetmap.de/wiki/Help/Action/Duplicate

comment:6 Changed 9 years ago by anonymous

Resolution: worksforme
Status: closedreopened

Not for me (Windows XP, version 3329, Java version 1.6.0_17) - it puts the new objects where the mouse pointer is when I hit ctrl-D.

comment:7 Changed 9 years ago by NE2

Sorry - the anon was me.

comment:8 Changed 9 years ago by stoecker

Resolution: fixed
Status: reopenedclosed

Move the mouse pointer out of the map view before pasting.

comment:9 Changed 9 years ago by NE2

Resolution: fixed
Status: closedreopened

That doesn't work...

comment:10 Changed 9 years ago by stoecker

Summary: No way to duplicate a way in the same place?Paste without mouse pointer in draw area should paste to center.

Seems Java changed behaviour. Even old versions of josm don't support this anymore.

comment:11 Changed 9 years ago by stoecker

Another note:
You can copy to the center when additionally pressing <ALT>. Under Linux I need to use <ALT-GR> and choose paste from menu. When you copy to another layer and choose there again and copy back, then you copy to the exact position.

Why the "move cursor out of window" does not work anymore is not totally clear. It seems the last move event does not properly vanish as expected.

comment:12 Changed 8 years ago by xeen

You could always paste to center using Edit → Paste. The current implementation takes the last recorded mouse event and uses its coordinates; otherwise it pastes to center. I have a patch that directly grabs the cursor’s coordinates and uses those which makes the suggested behavior easy to implement. Also, according to the comment in MapView “lastMEvent” *should* contain the last mouse event. So I don’t see why it should be cleared (or why it should vanish), as stoecker suggested.

Changed 8 years ago by xeen

Attachment: fix5170.patch added

I’ll commit after stabilization because the new behaviour might be confusing for people.

comment:13 Changed 8 years ago by xeen

Resolution: fixed
Status: reopenedclosed

In 5052/josm:

fix #5170

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.