Ticket #10857: 10857.patch

File 10857.patch, 921 bytes (added by ToeBee, 10 years ago)
  • src/org/openstreetmap/josm/gui/layer/NoteLayer.java

     
    4949    public NoteLayer(List<Note> notes, String name) {
    5050        super(name);
    5151        noteData = new NoteData(notes);
    52         init();
    5352    }
    5453
    5554    /** Convenience constructor that creates a layer with an empty note list */
     
    5655    public NoteLayer() {
    5756        super(tr("Notes"));
    5857        noteData = new NoteData();
    59         init();
    6058    }
    6159
    62     private void init() {
    63         if (Main.map != null && Main.map.mapView != null) {
    64             Main.map.mapView.addMouseListener(this);
    65         }
     60    @Override
     61    public void hookUpMapView() {
     62        Main.map.mapView.addMouseListener(this);
    6663    }
    6764
    6865    /**