Ignore:
Timestamp:
2023-09-11T20:01:42+02:00 (17 months ago)
Author:
taylor.smock
Message:

Fix #23170: DataIntegrityProblemException: Deleted node referenced when reconstructing a polygon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java

    r36134 r36136  
    6464        boolean wont = false;
    6565        for (RelationMember m : r.getMembers()) {
    66             if (m.isWay()) {
     66            if (m.isWay() && m.getWay().getReferrers().size() == 1) {
    6767                ways.add(m.getWay());
    6868            } else {
     
    7272        if (wont) {
    7373            JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
    74                     tr("Multipolygon must consist only of ways"), tr("Reconstruct polygon"), JOptionPane.ERROR_MESSAGE);
     74                    tr("Multipolygon must consist only of ways with one referring relation"),
     75                    tr("Reconstruct polygon"), JOptionPane.ERROR_MESSAGE);
    7576            return;
    7677        }
     
    174175                                candidateWay = tmp;
    175176                            }
    176                             final Command deleteCommand = DeleteCommand.delete(Collections.singleton(w));
    177                             if (deleteCommand != null) {
    178                                 commands.add(deleteCommand);
    179                             }
     177                            commands.add(new DeleteCommand(w));
    180178                        }
    181179                    }
Note: See TracChangeset for help on using the changeset viewer.