Changeset 6202 in osm for applications


Ignore:
Timestamp:
2007-12-31T16:37:22+01:00 (17 years ago)
Author:
gabriel
Message:

validator plugin: Don't combine the fix commands into a sequence command.

This is just a hack so that we don't step on our toes when fixing duplicate
nodes, i.e. our changes to the ways canceling each other out.

Location:
applications/editors/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java

    r4023 r6202  
    103103            return;
    104104       
    105         Bag<String, Command> commands = new Bag<String, Command>();
    106105        Set<DefaultMutableTreeNode> processedNodes = new HashSet<DefaultMutableTreeNode>();
    107106        for( TreePath path : selectionPaths )
     
    126125                                if( fixCommand != null )
    127126                                {
    128                                         commands.add(error.getMessage(), fixCommand);
     127                                        Main.main.undoRedo.add(fixCommand);
    129128                                }
    130129                        }
    131130                }
    132131        }
    133                
    134                 Command fixCommand = null;
    135                 if( commands.size() == 0 )
    136                         return;
    137132               
    138                 List<Command> allComands = new ArrayList<Command>(50);
    139                 for( Entry<String, List<Command>> errorType : commands.entrySet())
    140                 {
    141                         String description = errorType.getKey();
    142                         List<Command> errorCommands = errorType.getValue();
    143                         allComands.add( new SequenceCommand("Fix " + description, errorCommands) );
    144                 }
    145                
    146                 if( allComands.size() > 1 )
    147                         fixCommand = new SequenceCommand("Fix errors", allComands);
    148                 else
    149                         fixCommand = allComands.get(0);
    150                
    151                 Main.main.undoRedo.add( fixCommand );
    152133                Main.map.repaint();
    153134                DataSet.fireSelectionChanged(Main.ds.getSelected());
Note: See TracChangeset for help on using the changeset viewer.