Ignore:
Timestamp:
2010-11-07T18:57:46+01:00 (14 years ago)
Author:
guggis
Message:

'Fixing #5614 - JOSM Plugin turn Restrictions'

Location:
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionBuilder.java

    r23593 r24125  
    11package org.openstreetmap.josm.plugins.turnrestrictions;
    2 
    3 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.determineWayJoinOrientation;
    4 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.isEndNode;
    5 import static org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionBuilder.isStartNode;
    62
    73import java.util.ArrayList;
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditor.java

    r23571 r24125  
    8787    private JosmSelectionPanel pnlJosmSelection;
    8888    private BasicEditorPanel pnlBasicEditor;
    89     private AdvancedEditorPanel pnlAdvancedEditor;
    90     private IssuesView pnlIssuesView;
    9189    private TurnRestrictionEditorModel editorModel;
    9290    private JTabbedPane tpEditors;
     
    102100        pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
    103101
    104         pnl.add(new SideButton(new OKAction()));
    105         pnl.add(new SideButton(new CancelAction()));
    106        
    107         pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Plugins/turnrestrictions#TurnRestrictionEditor"))));
     102        SideButton b;
     103        pnl.add(b = new SideButton(new OKAction()));
     104        b.setName("btnOK");
     105        pnl.add(b = new SideButton(new CancelAction()));
     106        b.setName("btnCancel");
     107        pnl.add(b = new SideButton(new ContextSensitiveHelpAction(ht("/Plugins/turnrestrictions#TurnRestrictionEditor"))));
     108        b.setName("btnHelp");
    108109        return pnl;
    109110    }
     
    134135        tpEditors.setToolTipTextAt(0, tr("Edit basic attributes of a turn restriction"));
    135136       
    136         tpEditors.add(pnlAdvancedEditor = new AdvancedEditorPanel(editorModel));
     137        tpEditors.add(new AdvancedEditorPanel(editorModel));
    137138        tpEditors.setTitleAt(1, tr("Advanced"));
    138139        tpEditors.setToolTipTextAt(1, tr("Edit the raw tags and members of this turn restriction"));
    139140       
    140         tpEditors.add(pnlIssuesView = new IssuesView(editorModel.getIssuesModel()));
     141        tpEditors.add(new IssuesView(editorModel.getIssuesModel()));
    141142        tpEditors.setTitleAt(2, tr("Errors/Warnings"));
    142143        tpEditors.setToolTipTextAt(2, tr("Show errors and warnings related to this turn restriction"));
     
    650651                return;
    651652            }
    652             if (getTurnRestriction() == null) {
     653            if (getTurnRestriction() == null || getTurnRestriction().getDataSet() == null) {
    653654                applyNewTurnRestriction();
    654655                return;
     
    693694                return;
    694695            }
    695             if (getTurnRestriction() == null) {
     696            if (getTurnRestriction() == null || getTurnRestriction().getDataSet() == null) {
    696697                // it's a new turn restriction. Try to save it and close the dialog
    697698                if (applyNewTurnRestriction()) {
  • applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModel.java

    r23571 r24125  
    220220        CheckParameterUtil.ensureParameterNotNull(turnRestriction, "turnRestriction");     
    221221        TagCollection tags = tagEditorModel.getTagCollection();
    222         logger.info(tags.toString());
    223222        turnRestriction.removeAll();
    224223        tags.applyTo(turnRestriction);
Note: See TracChangeset for help on using the changeset viewer.