Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#13290 closed defect (fixed)

[Patch] pasting from other layer changes objects position

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone: 16.07
Component: Core Version:
Keywords: template_report regression gsoc-core Cc: michael2402

Description

What steps will reproduce the problem?

  1. copy some objects
  2. paste them in another data layer

What is the expected result?

the objects are pasted at the exact same position

What happens instead?

the objects are pasted at the mouse position (like if you copy paste in the same layer)

Please provide any additional information below. Attach a screenshot if possible.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-08-07 00:17:48 +0200 (Sun, 07 Aug 2016)
Build-Date:2016-08-07 01:34:32
Revision:10753
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10753 de) Windows 7 32-Bit
Memory Usage: 555 MB / 742 MB (109 MB allocated, but free)
Java version: 1.8.0_101-b13, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files\josm-latest-bla.jnlp, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=256m,768m, -Djnlpx.splashport=56608, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAA==]
Dataset consistency test: No problems found

Plugins:
+ AddrInterpolation (32584)
+ DirectDownload (32442)
+ DirectUpload (32329)
+ HouseNumberTaggingTool (32584)
+ Mapillary (32639)
+ OpeningHoursEditor (32583)
+ apache-commons (32584)
+ apache-http (32584)
+ buildings_tools (32728)
+ editgpx (32485)
+ imagery_offset_db (32528)
+ log4j (32309)
+ measurement (32732)
+ photo_geotagging (32392)
+ reverter (32584)
+ tag2link (32326)
+ tagging-preset-tester (32584)
+ terracer (32426)
+ turnlanes-tagging (1468266519)
+ turnrestrictions (32629)
+ undelete (32584)
+ utilsplugin2 (32725)
+ wikipedia (32749)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/StolpersteineLight&zip=1
+ http://zibi.openstreetmap.org.pl/kendzi/k/Simple3dPreset/s3db-preset.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/AdvertisingPreset&zip=1
+ D:\<user.name>\OSM\TestNew\newpresets.xml
+ D:\<user.name>\OSM\JOSMSVN\data\defaultpresets.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Tagsforobservatories&zip=1

Map paint styles:
+ D:\<user.name>\OSM\JOSMSVN\styles\standard\elemstyles.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/sac_scale&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ShowID&zip=1
- D:\<user.name>\OSM\eigene styles\PriorityRoad\PriorityRoad_1.0.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1
- D:\<user.name>\OSM\TestNew\newicons.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&style&zip=1
- D:\<user.name>\OSM\patches\old MPs\dataquality.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Osmc&style&zip=1
- https://raw.githubusercontent.com/species/josm-preset-wheelchair/master/sidewalks_kerbs.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LitObjects&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lit&style&zip=1
- D:\<user.name>\OSM\eigene styles\Tourenplanung.mapcss
- D:\<user.name>\OSM\eigene styles\SpecificBuildingValues\SpecificBuildingValues.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- http://www.openrailwaymap.org/styles/standard.mapcss
- D:\<user.name>\OSM\eigene styles\area-symbol.zip
- http://www.freietonne.de/ft_icons/josm/FreieTonne_rules_presets_zip.php
- https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/DestinationSignRelation&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Incline&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AdvertisingStyle&zip=1
- https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1

Validator rules:
+ https://raw.githubusercontent.com/stefan-a-bauer/josm-validators/master/mtb.validator.mapcss
+ D:\<user.name>\OSM\TestNew\new.validator.mapcss

Last errors/warnings:
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.net.SocketTimeoutException: Read timed out
- E: java.lang.reflect.InvocationTargetException. Ursache: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-2166 version=0 VT lat=50.6889012387574,lon=12.977615152440741}
- E: java.lang.reflect.InvocationTargetException. Ursache: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-2165 version=0 VT lat=50.69412124136882,lon=13.016439768352662}
- E: java.lang.reflect.InvocationTargetException. Ursache: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-8119 version=0 VT lat=50.6931526670214,lon=12.996466507968739}
- E: java.lang.reflect.InvocationTargetException. Ursache: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-8121 version=0 VT lat=50.69303798610741,lon=12.994365731103628}
- E: java.lang.reflect.InvocationTargetException. Ursache: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-8120 version=0 VT lat=50.693116459023585,lon=12.994141627969789}
- E: java.lang.reflect.InvocationTargetException. Ursache: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-8118 version=0 VT lat=50.69015527961156,lon=12.98864570412843}
- E: java.lang.reflect.InvocationTargetException. Ursache: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-8117 version=0 VT lat=50.693326637617936,lon=12.990228227192882}

Attachments (1)

patch-paste-at-same-position.patch (14.1 KB) - added by michael2402 3 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 3 years ago by Klumbumbus

Cc: michael2402 added

comment:2 Changed 3 years ago by Don-vip

Keywords: gsoc-core added

Changed 3 years ago by michael2402

comment:3 Changed 3 years ago by michael2402

Summary: pasting from other layer changes objects position[Patch] pasting from other layer changes objects position

I don't like that behavior because it is inconsistent. It also breaks the following workflow:

  • Open a second editor with JOSM
  • Create some template objects there (e.g. a node with natural=tree)
  • Copy it from there
  • Paste in current window

I attached a patch that adds a new action to paste at the source coordinates. It uses CTRL+ALT+V (used by several graphic programs, e.g. Inkscape). That way we have a consistent behavior.

There is a problem with registering the action in the patch: JOSM complains about reassigning "paste" between PasteAction and PasteAtSourcePositionAction. I don't know why - I am not familiar with the action system.

comment:4 Changed 3 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 10766/josm:

fix #13290 - pasting from other layer changes objects position (modified patch by michael2402) - gsoc-core

comment:5 Changed 3 years ago by Don-vip

Thanks! I have changed the action to be expert mode only, and fixed the toolbarId warning.

comment:6 Changed 3 years ago by Klumbumbus

A worflow I use is to copy the nodes from a osm file from keypadmapper3 into my working data layer. There I need the same position.

Extemporaneously (I just learned a new word ;)) I can't give more workflow examples now, but I always felt that the behavior was good.

comment:7 Changed 3 years ago by rickmastfan67

These changes seem to have introduced some conflicts with the utilsplugin2 and core now. This was tested with a fresh profile. These errors showed up immediately once the 'utilsplugin2' plugin was installed in the Java Console.

INFO: Reassigning shortcut 'tools:pasterelations' from null to 640 because of conflict with Ctrl+Alt+V
INFO: Silent shortcut conflict: 'tools:pasterelations' moved by 'menu:edit:pasteAtSource' to 'Ctrl+Alt+F1'.
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-08-09 00:25:24 +0200 (Tue, 09 Aug 2016)
Build-Date:2016-08-09 01:35:26
Revision:10770
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10770 en) Windows 7 64-Bit
Memory Usage: 574 MB / 1820 MB (513 MB allocated, but free)
Java version: 1.8.0_77-b03, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Plugins:
+ utilsplugin2 (32725)

comment:8 in reply to:  7 Changed 3 years ago by rickmastfan67

Replying to rickmastfan67:

These changes seem to have introduced some conflicts with the utilsplugin2 and core now. This was tested with a fresh profile. These errors showed up immediately once the 'utilsplugin2' plugin was installed in the Java Console.

INFO: Reassigning shortcut 'tools:pasterelations' from null to 640 because of conflict with Ctrl+Alt+V
INFO: Silent shortcut conflict: 'tools:pasterelations' moved by 'menu:edit:pasteAtSource' to 'Ctrl+Alt+F1'.
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-08-09 00:25:24 +0200 (Tue, 09 Aug 2016)
Build-Date:2016-08-09 01:35:26
Revision:10770
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10770 en) Windows 7 64-Bit
Memory Usage: 574 MB / 1820 MB (513 MB allocated, but free)
Java version: 1.8.0_77-b03, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Plugins:
+ utilsplugin2 (32725)

This has now been posted as a separate ticket. (#13336)

comment:9 Changed 3 years ago by michael2402

How should we resolve this? Should we re-assign a new action for in-place pasting? Or simply remove the key binding and leave the menu entry?

comment:10 Changed 3 years ago by Klumbumbus

Or changing the shortcut of the plugin :)

comment:11 Changed 3 years ago by anonymous

If you prefer the old behaviour of Ctrl+V, you can always change you keyboard preferences.

comment:12 Changed 3 years ago by Klumbumbus

Ticket #13825 has been marked as a duplicate of this ticket.

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.