Changeset 7674 in josm for trunk/src


Ignore:
Timestamp:
2014-10-29T20:48:08+01:00 (5 years ago)
Author:
Don-vip
Message:

code refactoring to avoid hacks in merge-overlap plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java

    r7661 r7674  
    113113    private AutoAdjustingSplitPane spTagConflictTypes;
    114114    private TagConflictResolver pnlTagConflictResolver;
    115     private RelationMemberConflictResolver pnlRelationMemberConflictResolver;
     115    protected RelationMemberConflictResolver pnlRelationMemberConflictResolver;
    116116    private boolean canceled;
    117117    private JPanel pnlButtons;
    118     private OsmPrimitive targetPrimitive;
     118    protected OsmPrimitive targetPrimitive;
    119119
    120120    /** the private help action */
     
    191191    }
    192192
     193    protected ApplyAction buildApplyAction() {
     194        return new ApplyAction();
     195    }
     196
    193197    protected JPanel buildButtonPanel() {
    194198        JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
    195199
    196200        // -- apply button
    197         ApplyAction applyAction = new ApplyAction();
     201        ApplyAction applyAction = buildApplyAction();
    198202        pnlTagConflictResolver.getModel().addPropertyChangeListener(applyAction);
    199203        pnlRelationMemberConflictResolver.getModel().addPropertyChangeListener(applyAction);
     
    295299
    296300    protected void prepareDefaultTagDecisions() {
    297         TagConflictResolverModel model = getTagConflictResolverModel();
    298         model.prepareDefaultTagDecisions();
    299         model.rebuild();
     301        getTagConflictResolverModel().prepareDefaultTagDecisions();
    300302    }
    301303
     
    417419    }
    418420
    419     class ApplyAction extends AbstractAction implements PropertyChangeListener {
     421    protected class ApplyAction extends AbstractAction implements PropertyChangeListener {
    420422
    421423        public ApplyAction() {
Note: See TracChangeset for help on using the changeset viewer.