Changeset 3523 in josm


Ignore:
Timestamp:
2010-09-13T19:53:38+02:00 (14 years ago)
Author:
bastiK
Message:

reduce number of unnecessary mapview.repaint()

File:
1 edited

Legend:

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

    r3462 r3523  
    507507            return; // not allowed together
    508508
    509         // plain clicks with no modifiers clear the selection
    510         if (!ctrl && !shift) {
    511             ds.clearSelection();
    512         }
    513 
    514509        if (ctrl) {
    515510            // Ctrl on an item toggles its selection status,
     
    522517            }
    523518        } else {
    524             // This is either a plain click (which means we
    525             // previously cleared the selection), or a
    526             // shift-click where we are adding things to an
    527             // existing selection.
    528             ds.addSelected(selectionList);
    529         }
    530         Main.map.mapView.repaint();
     519            // plain clicks with no modifiers
     520            if (!shift) {
     521                ds.setSelected(selectionList);
     522            } else {
     523                // add things to an
     524                // existing selection.
     525                ds.addSelected(selectionList);
     526            }
     527        }
    531528    }
    532529
Note: See TracChangeset for help on using the changeset viewer.