﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10350	[Patch] ‘Copy tags from previous selection’ uses tags from the wrong (older) selection when changing layers	huftis	team	"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:

1. For the first object, everything works OK.
2. 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.
3. If one after step d) changes the layer and immediately change it back again, the correct tags are copied in step e)."	defect	new	normal		Plugin utilsplugin2				Don-vip Klumbumbus
