Ticket #18675: 18675.patch

File 18675.patch, 1.8 KB (added by GerdP, 6 years ago)
  • src/org/openstreetmap/josm/actions/JoinAreasAction.java

     
    6262    private DataSet ds;
    6363    private final transient List<Relation> addedRelations = new LinkedList<>();
    6464    private final boolean addUndoRedo;
     65    private boolean tagConflictsResolved;
    6566
    6667    /**
    6768     * This helper class describes join areas action result.
     
    484485
    485486    private void clearFields() {
    486487        ds = null;
     488        tagConflictsResolved = false;
    487489        cmdsCount = 0;
    488490        cmds.clear();
    489491        addedRelations.clear();
     
    570572                        allWays.addAll(pol.innerWays);
    571573                    }
    572574                    ds.setSelected(allWays);
     575                    if (result.polygons.size() > 1 && tagConflictsResolved) {
     576                        new Notification(tr("Selected ways were not joined to a single area but have the same tags now."
     577                                + "<br>Please verify no errors have been introduced."))
     578                                        .setIcon(JOptionPane.INFORMATION_MESSAGE).setDuration(Notification.TIME_LONG)
     579                                        .show();
     580                    }
    573581                }
    574582            } else {
    575583                new Notification(
     
    816824        TagCollection wayTags = TagCollection.unionOfAllPrimitives(ways);
    817825        try {
    818826            cmds.addAll(CombinePrimitiveResolverDialog.launchIfNecessary(wayTags, ways, ways));
     827            tagConflictsResolved = (!cmds.isEmpty());
    819828            commitCommands(marktr("Fix tag conflicts"));
    820829            return true;
    821830        } catch (UserCancelException ex) {