Ignore:
Timestamp:
2006-04-21T14:31:51+02:00 (18 years ago)
Author:
imi
Message:
  • added conflicts and resolve conflict dialog

This is one of those "changed everything" checkpoint.

File:
1 edited

Legend:

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

    r71 r86  
    2626 * @see #deleteWithReferences(OsmPrimitive)
    2727 *
    28  * Pressing Alt will select the way instead of a line segment, as usual.
     28 * Pressing Alt will select the way instead of a segment, as usual.
    2929 *
    3030 * If the user did not press Ctrl and the object has any references, the user
     
    4646        }
    4747
    48         @Override
    49         public void registerListener() {
     48        @Override public void registerListener() {
    5049                super.registerListener();
    5150                mv.addMouseListener(this);
    5251        }
    5352
    54         @Override
    55         public void unregisterListener() {
     53        @Override public void unregisterListener() {
    5654                super.unregisterListener();
    5755                mv.removeMouseListener(this);
     
    5957
    6058       
    61         @Override
    62         public void actionPerformed(ActionEvent e) {
     59        @Override public void actionPerformed(ActionEvent e) {
    6360                super.actionPerformed(e);
    6461                boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
    6562                if (ctrl)
    66                         deleteWithReferences(Main.main.ds.getSelected());
     63                        deleteWithReferences(Main.ds.getSelected());
    6764                else
    68                         delete(Main.main.ds.getSelected(), false);
     65                        delete(Main.ds.getSelected(), false);
    6966                mv.repaint();
    7067        }
     
    7471         * position.
    7572         */
    76         @Override
    77         public void mouseClicked(MouseEvent e) {
     73        @Override public void mouseClicked(MouseEvent e) {
    7874                if (e.getButton() != MouseEvent.BUTTON1)
    7975                        return;
     
    9490         * Delete the primitives and everything they references.
    9591         *
    96          * If a node is deleted, the node and all line segments, ways and areas
     92         * If a node is deleted, the node and all segments, ways and areas
    9793         * the node is part of are deleted as well.
    9894         *
    99          * If a line segment is deleted, all ways the line segment is part of
     95         * If a segment is deleted, all ways the segment is part of
    10096         * are deleted as well. No nodes are deleted.
    10197         *
    102          * If a way is deleted, only the way and no line segments or nodes are
     98         * If a way is deleted, only the way and no segments or nodes are
    10399         * deleted.
    104100         *
     
    110106                Collection<Command> deleteCommands = new LinkedList<Command>();
    111107                for (OsmPrimitive osm : selection)
    112                         deleteCommands.add(new DeleteCommand(Main.main.ds, osm));
     108                        deleteCommands.add(new DeleteCommand(osm));
    113109                if (!deleteCommands.isEmpty())
    114110                        mv.editLayer().add(new SequenceCommand(deleteCommands));
     
    126122                Collection<Command> deleteCommands = new LinkedList<Command>();
    127123                for (OsmPrimitive osm : selection) {
    128                         CollectBackReferencesVisitor v = new CollectBackReferencesVisitor(Main.main.ds);
     124                        CollectBackReferencesVisitor v = new CollectBackReferencesVisitor(Main.ds);
    129125                        osm.visit(v);
    130126                        if (!selection.containsAll(v.data)) {
     
    132128                                        JOptionPane.showMessageDialog(Main.main, "This object is in use.");
    133129                        } else
    134                                 deleteCommands.add(new DeleteCommand(Main.main.ds, osm));
     130                                deleteCommands.add(new DeleteCommand(osm));
    135131                }
    136132                if (!deleteCommands.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.