Ignore:
Timestamp:
2018-02-18T05:02:23+01:00 (12 months ago)
Author:
Don-vip
Message:

see #8039, see #10456 - support read-only data layers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java

    r13210 r13434  
    342342
    343343        protected void setCurrentRelationAsSelection() {
    344             MainApplication.getLayerManager().getEditDataSet().setSelected(displaylist.getSelectedValue());
     344            MainApplication.getLayerManager().getActiveDataSet().setSelected(displaylist.getSelectedValue());
    345345        }
    346346
     
    351351        @Override
    352352        public void mouseClicked(MouseEvent e) {
    353             if (MainApplication.getLayerManager().getEditLayer() == null) return;
    354             if (isDoubleClick(e)) {
    355                 if (e.isControlDown()) {
     353            DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
     354            if (ds != null && isDoubleClick(e)) {
     355                if (e.isControlDown() && !ds.isReadOnly()) {
    356356                    editCurrentRelation();
    357357                } else {
     
    733733            return;
    734734        // trigger a sort of the relation list because the display name may have changed
    735         //
    736735        List<Relation> sel = model.getSelectedRelations();
    737736        model.sort();
     
    742741    @Override
    743742    public void dataChanged(DataChangedEvent event) {
    744         initFromLayer(MainApplication.getLayerManager().getEditLayer());
     743        initFromLayer(MainApplication.getLayerManager().getActiveDataLayer());
    745744    }
    746745
Note: See TracChangeset for help on using the changeset viewer.