Ignore:
Timestamp:
2008-08-22T21:25:28+02:00 (18 years ago)
Author:
stoecker
Message:

Prevent editing inactive layer. Fix layer oder and display order. Closes #371

File:
1 edited

Legend:

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

    r804 r845  
    124124         */
    125125        public void eventDispatched(AWTEvent event) {
     126                if(!Main.map.mapView.isDrawableLayer())
     127                        return;
    126128                InputEvent e = (InputEvent) event;
    127129                ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
     
    134136         */
    135137        public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
     138                if(!Main.map.mapView.isDrawableLayer())
     139                        return;
    136140                computeHelperLine();
    137141        }
     
    146150
    147151                if (e.getButton() != MouseEvent.BUTTON1)
     152                        return;
     153                if(!Main.map.mapView.isDrawableLayer())
    148154                        return;
    149155
     
    331337       
    332338        @Override public void mouseMoved(MouseEvent e) {
     339                if(!Main.map.mapView.isDrawableLayer())
     340                        return;
    333341
    334342                // we copy ctrl/alt/shift from the event just in case our global
     
    441449         */
    442450        @Override public void mouseExited(MouseEvent e) {
     451                if(!Main.map.mapView.isDrawableLayer())
     452                        return;
    443453                mousePos = e.getPoint();
    444454                Main.map.mapView.repaint();
Note: See TracChangeset for help on using the changeset viewer.