Changeset 9409 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-11T17:09:33+01:00 (9 years ago)
Author:
simon04
Message:

fix #12335 - Disable "Angle snapping", "Dual alignment" when no edit layer is present, fixes NPE

Location:
trunk/src/org/openstreetmap/josm/actions/mapmode
Files:
2 edited

Legend:

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

    r9230 r9409  
    17891789            }
    17901790        }
     1791
     1792        @Override
     1793        protected void updateEnabledState() {
     1794            setEnabled(Main.main != null && Main.main.hasEditLayer());
     1795        }
    17911796    }
    17921797}
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r9231 r9409  
    198198        public void actionPerformed(ActionEvent e) {
    199199            toggleDualAlign();
     200        }
     201
     202        @Override
     203        protected void updateEnabledState() {
     204            setEnabled(Main.main != null && Main.main.hasEditLayer());
    200205        }
    201206    }
Note: See TracChangeset for help on using the changeset viewer.