Ignore:
Timestamp:
2012-08-11T23:37:27+02:00 (12 years ago)
Author:
Don-vip
Message:

fix #7873 - select geotagged image should not be allowed in add node mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java

    r5242 r5430  
    4242import org.openstreetmap.josm.actions.RenameLayerAction;
    4343import org.openstreetmap.josm.actions.mapmode.MapMode;
     44import org.openstreetmap.josm.actions.mapmode.SelectAction;
    4445import org.openstreetmap.josm.data.Bounds;
    4546import org.openstreetmap.josm.data.coor.LatLon;
     
    724725    private void hook_up_mouse_events() {
    725726        mouseAdapter = new MouseAdapter() {
     727            private final boolean isMapModeOk() {
     728                return Main.map.mapMode == null || Main.map.mapMode instanceof SelectAction;
     729            }
    726730            @Override public void mousePressed(MouseEvent e) {
    727731
    728732                if (e.getButton() != MouseEvent.BUTTON1)
    729733                    return;
    730                 if (isVisible()) {
     734                if (isVisible() && isMapModeOk()) {
    731735                    Main.map.mapView.repaint();
    732736                }
     
    736740                if (ev.getButton() != MouseEvent.BUTTON1)
    737741                    return;
    738                 if (data == null || !isVisible())
     742                if (data == null || !isVisible() || !isMapModeOk())
    739743                    return;
    740744
Note: See TracChangeset for help on using the changeset viewer.