Changeset 34551 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java
- Timestamp:
- 2018-08-18T20:08:26+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/RelContextDialog.java
r34346 r34551 58 58 import javax.swing.table.TableColumnModel; 59 59 60 import org.openstreetmap.josm.Main;61 60 import org.openstreetmap.josm.actions.JosmAction; 62 61 import org.openstreetmap.josm.command.ChangeRelationMemberRoleCommand; 63 62 import org.openstreetmap.josm.command.Command; 64 63 import org.openstreetmap.josm.command.SequenceCommand; 64 import org.openstreetmap.josm.data.UndoRedoHandler; 65 65 import org.openstreetmap.josm.data.osm.DataSelectionListener; 66 66 import org.openstreetmap.josm.data.osm.DataSet; … … 79 79 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 80 80 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox; 81 import org.openstreetmap.josm.spi.preferences.Config; 81 82 import org.openstreetmap.josm.tools.GBC; 82 83 import org.openstreetmap.josm.tools.Logging; … … 205 206 }); 206 207 downloadButton.setVisible(false); 207 if ( Main.pref.getBoolean(PREF_PREFIX + ".hidetopline", false)) {208 if (Config.getPref().getBoolean(PREF_PREFIX + ".hidetopline", false)) { 208 209 chosenRelationPanel.setVisible(false); 209 210 } … … 359 360 @Override 360 361 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)) { 362 363 chosenRelationPanel.setVisible(newRelation != null); 363 364 } … … 494 495 } 495 496 }; 496 final JDialog dlg = optionPane.createDialog(Main .parent, tr("Specify role"));497 final JDialog dlg = optionPane.createDialog(MainApplication.getMainFrame(), tr("Specify role")); 497 498 dlg.setModalityType(ModalityType.DOCUMENT_MODAL); 498 499 … … 573 574 } 574 575 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)); 577 578 } 578 579 } … … 603 604 String fullProperty = PREF_PREFIX + ".multipolygon." + property; 604 605 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))); 606 607 item.setActionCommand(fullProperty); 607 608 item.addActionListener(this); … … 615 616 if (property != null && property.length() > 0 && e.getSource() instanceof JCheckBoxMenuItem) { 616 617 boolean value = ((JCheckBoxMenuItem) e.getSource()).isSelected(); 617 Main.pref.putBoolean(property, value);618 Config.getPref().putBoolean(property, value); 618 619 show(getInvoker(), getX(), getY()); 619 620 }
Note:
See TracChangeset
for help on using the changeset viewer.
