Ignore:
Timestamp:
2013-12-22T12:27:11+01:00 (11 years ago)
Author:
donvip
Message:

[josm-plugins] global replacement of Main.map.mapview.getEditLayer() by Main.main.getEditLayer() (avoids NPEs)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java

    r29535 r30145  
    243243                    Relation relation = (Relation)relationsData.getValueAt(row, 0);
    244244                    if( e.getClickCount() > 1 ) {
    245                         Main.map.mapView.getEditLayer().data.setSelected(relation);
     245                        Main.main.getEditLayer().data.setSelected(relation);
    246246                    }
    247247                }
     
    487487        public void mouseClicked( MouseEvent e ) {
    488488            if( e.isControlDown() || !(e.getComponent() instanceof JComboBox ) ) // do not use left click handler on combo box
    489             if( SwingUtilities.isLeftMouseButton(e) && chosenRelation.get() != null && Main.map.mapView.getEditLayer() != null ) {
    490                 Main.map.mapView.getEditLayer().data.setSelected(chosenRelation.get());
     489            if( SwingUtilities.isLeftMouseButton(e) && chosenRelation.get() != null && Main.main.getEditLayer() != null ) {
     490                Main.main.getEditLayer().data.setSelected(chosenRelation.get());
    491491            }
    492492        }
Note: See TracChangeset for help on using the changeset viewer.