Changeset 6569 in josm for trunk


Ignore:
Timestamp:
2013-12-31T00:13:23+01:00 (10 years ago)
Author:
simon04
Message:

see #9492 - Tools>"Update Multipolygon": check that relation is loaded completely

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java

    r6564 r6569  
    9393        }
    9494
     95        final Relation multipolygonRelation = getSelectedMultipolygonRelation(selectedRelations);
     96        if (multipolygonRelation != null && (multipolygonRelation.isIncomplete() || multipolygonRelation.hasIncompleteMembers())) {
     97            new Notification(
     98                    tr("Cannot update multipolygon since relation is incomplete."))
     99                    .setIcon(JOptionPane.WARNING_MESSAGE)
     100                    .setDuration(Notification.TIME_DEFAULT)
     101                    .show();
     102            return;
     103        }
     104
    95105        final Pair<SequenceCommand, Relation> commandAndRelation = createMultipolygonCommand(selectedWays, selectedRelations);
     106        if (commandAndRelation == null) {
     107            return;
     108        }
    96109        final Command command = commandAndRelation.a;
    97110        final Relation relation = commandAndRelation.b;
    98         if (command == null) {
    99             return;
    100         }
    101111        Main.main.undoRedo.add(command);
    102112
Note: See TracChangeset for help on using the changeset viewer.