Ticket #2179: FixPotLatchdraw.patch

File FixPotLatchdraw.patch, 863 bytes (added by xeen, 17 years ago)

this also works nicely for agpifoj without having to switch layers when trying to select photos

  • src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

     
    295295        boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
    296296        // boolean alt = (e.getModifiers() & ActionEvent.ALT_MASK) != 0;
    297297        boolean shift = (e.getModifiers() & ActionEvent.SHIFT_MASK) != 0;
     298       
     299        // We don't want to change to draw tool if the user tries to (de)select
     300        // stuff but accidentally clicks in an empty area when selection is empty
     301        if(shift || ctrl)
     302            cancelDrawMode = true;
    298303
    299304        mouseDownTime = System.currentTimeMillis();
    300305        didMove = false;