Opened 10 years ago
Last modified 5 years ago
#10350 new defect
‘Copy tags from previous selection’ uses tags from the wrong (older) selection when changing layers — at Version 1
Reported by: | huftis | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin utilsplugin2 | Version: | |
Keywords: | Cc: | Don-vip, Klumbumbus |
Description (last modified by )
When switching between two layers, the ‘Copy tags from previous selection’ doesn’t work properly. For every selection except the first, it uses the tags from ‘one before the previous’ selection. To workaround this, one have to do an extra layer switch. Details and example below.
How to reproduce:
Open JOSM. Download the following area (or open attachment:lakes.osm).
min.lat 59.2577648
max.lat 59.2687317
min.lon 5.2319813
max.lon 5.2682877
It should contain three lakes.
Save the following text as a file named test.csv:
latitude, longitude, natural, name
59.262, 5.238, water, foo
59.261, 5.254, water, bar
59.263, 5.260, water, baz
Open ‘test.csv’ in JOSM (using opendata
plugin) – or open attachment:names.osm. Press OK to import it. You will now have two layers, the OSM data layer and the ‘test.csv’ layer. The latter contains names (not real names) of three lakes in the OSM data. The goal is to copy these names to the lakes, so we do the following:
Select the leftmost point, named ‘foo’. Change the active (editing) layer to the OSM layer (by clicking on the empty space to the left of ‘Data Layer 1’ in ‘Layers’ panel). Select the leftmost lake. Press ‘Shift + R’. The tags are correctly copied, and the lake is now named ‘foo’.
Now try to repeat this type of operation. Change the layer to ‘test.csv’. Click the ‘bar’ point. Change the layer back. Click the second lake. Press ‘Shift + R’. Note that the tags of the ‘foo’ object, not the the ’bar’ object, is copied. This is a bug. Now change the layer to ‘test.csv’ and then back again (without doing anything else). Try ‘Shift + R’ again. Now the tags from ‘bar’ object is correctly copied.
To summarise:
- For the first object, everything works OK.
- For any later object, the following operations uses data for the second to last selected object, instead of from the last selected object.
a) Change layer.
b) Select source object.
c) Change layer back.
d) Select target object.
e) Press ‘Shift + R’.
f) Observe that the wrong tags have been copied.
- If one after step d) changes the layer and immediately change it back again, the correct tags are copied in step e).
(Simplify instructions)