Ignore:
Timestamp:
2018-08-18T20:08:26+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 14153

File:
1 edited

Legend:

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

    r34346 r34551  
    5858import javax.swing.table.TableColumnModel;
    5959
    60 import org.openstreetmap.josm.Main;
    6160import org.openstreetmap.josm.actions.JosmAction;
    6261import org.openstreetmap.josm.command.ChangeRelationMemberRoleCommand;
    6362import org.openstreetmap.josm.command.Command;
    6463import org.openstreetmap.josm.command.SequenceCommand;
     64import org.openstreetmap.josm.data.UndoRedoHandler;
    6565import org.openstreetmap.josm.data.osm.DataSelectionListener;
    6666import org.openstreetmap.josm.data.osm.DataSet;
     
    7979import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
    8080import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox;
     81import org.openstreetmap.josm.spi.preferences.Config;
    8182import org.openstreetmap.josm.tools.GBC;
    8283import org.openstreetmap.josm.tools.Logging;
     
    205206        });
    206207        downloadButton.setVisible(false);
    207         if (Main.pref.getBoolean(PREF_PREFIX + ".hidetopline", false)) {
     208        if (Config.getPref().getBoolean(PREF_PREFIX + ".hidetopline", false)) {
    208209            chosenRelationPanel.setVisible(false);
    209210        }
     
    359360    @Override
    360361    public void chosenRelationChanged(Relation oldRelation, Relation newRelation) {
    361         if (chosenRelationPanel != null && Main.pref.getBoolean(PREF_PREFIX + ".hidetopline", false)) {
     362        if (chosenRelationPanel != null && Config.getPref().getBoolean(PREF_PREFIX + ".hidetopline", false)) {
    362363            chosenRelationPanel.setVisible(newRelation != null);
    363364        }
     
    494495            }
    495496        };
    496         final JDialog dlg = optionPane.createDialog(Main.parent, tr("Specify role"));
     497        final JDialog dlg = optionPane.createDialog(MainApplication.getMainFrame(), tr("Specify role"));
    497498        dlg.setModalityType(ModalityType.DOCUMENT_MODAL);
    498499
     
    573574            }
    574575            if (!commands.isEmpty()) {
    575                 //                Main.main.undoRedo.add(new ChangeCommand(chosenRelation.get(), r));
    576                 MainApplication.undoRedo.add(new SequenceCommand(tr("Change relation member roles to {0}", role), commands));
     576                //                UndoRedoHandler.getInstance().add(new ChangeCommand(chosenRelation.get(), r));
     577                UndoRedoHandler.getInstance().add(new SequenceCommand(tr("Change relation member roles to {0}", role), commands));
    577578            }
    578579        }
     
    603604            String fullProperty = PREF_PREFIX + ".multipolygon." + property;
    604605            JCheckBoxMenuItem item = new JCheckBoxMenuItem(tr(title));
    605             item.setSelected(Main.pref.getBoolean(fullProperty, CreateMultipolygonAction.getDefaultPropertyValue(property)));
     606            item.setSelected(Config.getPref().getBoolean(fullProperty, CreateMultipolygonAction.getDefaultPropertyValue(property)));
    606607            item.setActionCommand(fullProperty);
    607608            item.addActionListener(this);
     
    615616            if (property != null && property.length() > 0 && e.getSource() instanceof JCheckBoxMenuItem) {
    616617                boolean value = ((JCheckBoxMenuItem) e.getSource()).isSelected();
    617                 Main.pref.putBoolean(property, value);
     618                Config.getPref().putBoolean(property, value);
    618619                show(getInvoker(), getX(), getY());
    619620            }
Note: See TracChangeset for help on using the changeset viewer.