Ignore:
Timestamp:
2016-01-17T02:54:22+01:00 (10 years ago)
Author:
Don-vip
Message:

massive refactoring of GenericRelationEditor. As JDialog cannot be instantiated in headless mode, extract all actions to separate classes in new package gui.dialogs.relation.actions in order to test them with JUnit

File:
1 edited

Legend:

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

    r9472 r9496  
    331331     *
    332332     * @param layer the layer in whose context the relations are deleted. Must not be null.
    333      * @param toDelete  the relations to be deleted. Must not be null.
     333     * @param toDelete the relations to be deleted. Must not be null.
    334334     * @throws IllegalArgumentException if layer is null
    335335     * @throws IllegalArgumentException if toDelete is null
     
    344344            Main.main.undoRedo.add(cmd);
    345345            for (Relation relation : toDelete) {
    346                 if (getCurrentDataSet().getSelectedRelations().contains(relation)) {
    347                     getCurrentDataSet().toggleSelected(relation);
     346                if (layer.data.getSelectedRelations().contains(relation)) {
     347                    layer.data.toggleSelected(relation);
    348348                }
    349349                RelationDialogManager.getRelationDialogManager().close(layer, relation);
Note: See TracChangeset for help on using the changeset viewer.