Modify

Opened 3 weeks ago

Closed 2 weeks ago

Last modified 2 weeks ago

#15507 closed defect (fixed)

Update multipolygon action no longer works (since JOSM 12914)

Reported by: sebastic Owned by: team
Priority: normal Milestone: 17.11
Component: Core multipoly Version: tested
Keywords: multipolygon regression Cc: sebastic

Description (last modified by Klumbumbus)

Since JOSM 12914 the 'Update multipolygon' action no longer works.

Selecting the (only) outer way and the relation, and then using Ctrl+Shift+B or the menu option does not perform any action (nothing logged in debug mode on the console either).

The 'Create multipolygon' action still works.

SVN r12726 looks like a possible culprit where this change was committed to src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java:

@@ -247,7 +247,7 @@ public class CreateMultipolygonAction extends JosmAction {
         final List<Command> list = removeTagsFromWaysIfNeeded(relation);
         final String commandName;
         if (existingRelation == null) {
-            list.add(new AddCommand(relation));
+            list.add(new AddCommand(selectedWays.iterator().next().getDataSet(), relation));
             commandName = getName(false);
         } else {
             list.add(new ChangeCommand(existingRelation, relation));

The other changes to CreateMultipolygonAction.java seem to be pretty harmless Config.getPref() changes, and my prefs match the default values.

Perhaps the ChangeCommand needs to pass the Dataset too?

Attachments (2)

15507.osm (2.5 KB) - added by Don-vip 2 weeks ago.
old-style2.osm (3.0 KB) - added by stoecker 2 weeks ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 3 weeks ago by Klumbumbus

Description: modified (diff)

comment:2 Changed 3 weeks ago by sebastic

Interestingly the action works for newly created objects in the layer.

It doesn't work for existing relations in the layer, in my case http://area.jochentopf.com/download/old-style.osm.pbf via the poly plugin.

comment:3 Changed 2 weeks ago by Don-vip

The update multipolygon action is meant to add inner ways, and it seems to work.

Can you please provide a step-by-step scenario explaining what's not working for you?

comment:4 Changed 2 weeks ago by anonymous

  • Open the old-style.osm.pdf file
  • Zoom to a relation with at least two member ways
  • Select the outer way with the tags describing the feature
  • Add the relation to the selection using the right click menu
  • Press Ctrl+Shift+B or use the Update multipolygon menu option

This procedure worked until recently. It would move the tags from the outer way to the relation, and remove the area=yes tags from the inner ways if present. Now, nothing happens.

This procedure is also documented on: http://area.jochentopf.com/old-style-josm.html

comment:5 Changed 2 weeks ago by Don-vip

OK, thanks.

comment:6 Changed 2 weeks ago by Don-vip

Doesn't work neither in r12717, r12545, r12450, r12275

Last edited 2 weeks ago by Don-vip (previous) (diff)

Changed 2 weeks ago by Don-vip

Attachment: 15507.osm added

comment:7 Changed 2 weeks ago by Don-vip

Milestone: 17.11

I can't find a recent version (tested up to r12275, 2017-05-29) where JOSM behaves how you expect. Can you please check if this ever worked in an older version?

comment:8 Changed 2 weeks ago by Don-vip

Keywords: multipolygon added

comment:9 Changed 2 weeks ago by sebastic

Keywords: multipolygon removed
Milestone: 17.11

That is quite unusual, because I've been successfully using this feature on a daily basis until JOSM 12914.

comment:10 Changed 2 weeks ago by sebastic

I've just tested with the old backport of JOSM 12712 from stretch-backports (and pbf plugin version 33568), and that still works as expected.

I updated relation:7697473 from todays old-style.osm.pbf file.

After upgrading the josm package to the backport of JOSM 12921 it no longer works.

comment:11 Changed 2 weeks ago by sebastic

Keywords: multipolygon added
Milestone: 17.11

comment:12 Changed 2 weeks ago by stoecker

Happened between r12717 and r12767.

Better description:

  • Select outer line of the shortened file (old-style2.osm)
  • Press Ctrl+Shift+B or use the Update multipolygon menu option
Last edited 2 weeks ago by stoecker (previous) (diff)

Changed 2 weeks ago by stoecker

Attachment: old-style2.osm added

comment:13 Changed 2 weeks ago by Don-vip

Keywords: regression added
Milestone: 17.11

OK with Dirk's description I can reproduce the problem.

comment:14 Changed 2 weeks ago by Don-vip

Resolution: fixed
Status: newclosed

In 13067/josm:

fix #15507 - Update multipolygon action no longer works (regression from r12726)

comment:15 Changed 2 weeks ago by anonymous

Thanks for the fix, I've added r13067 as a patch to the Debian package and confirm that it fixes the issue.

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.