Changeset 6072 in josm for trunk/src/org
- Timestamp:
- 2013-07-18T20:42:36+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/tagging
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItem.java
r6070 r6072 20 20 21 21 protected void initAutoCompletionField(AutoCompletingTextField field, String key) { 22 if (Main.main == null) return; 22 23 OsmDataLayer layer = Main.main.getEditLayer(); 23 24 if (layer == null) { -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java
r6071 r6072 33 33 import javax.swing.event.DocumentEvent; 34 34 import javax.swing.event.DocumentListener; 35 import javax.swing.event.ListSelectionEvent; 36 import javax.swing.event.ListSelectionListener; 35 37 import org.openstreetmap.josm.Main; 36 38 import org.openstreetmap.josm.data.SelectionChangedListener; … … 50 52 /** 51 53 * GUI component to select tagging preset: the list with filter and two checkboxes 52 * @since 606 754 * @since 6068 53 55 */ 54 56 public class TaggingPresetSelector extends JPanel implements SelectionChangedListener { … … 200 202 public TaggingPresetSelector() { 201 203 super(new BorderLayout()); 202 203 loadPresets(TaggingPresetPreference.taggingPresets); 204 if (TaggingPresetPreference.taggingPresets!=null) { 205 loadPresets(TaggingPresetPreference.taggingPresets); 206 } 204 207 205 208 edSearchText = new JosmTextField(); … … 374 377 typesInSelectionDirty = false; 375 378 typesInSelection.clear(); 376 if (Main.main .getCurrentDataSet() == null) return typesInSelection;379 if (Main.main==null || Main.main.getCurrentDataSet() == null) return typesInSelection; 377 380 for (OsmPrimitive primitive : Main.main.getCurrentDataSet().getSelected()) { 378 381 if (primitive instanceof Node) { … … 470 473 } 471 474 475 public void addSelectionListener(final ActionListener selectListener) { 476 lsResult.getSelectionModel().addListSelectionListener(new ListSelectionListener() { 477 @Override 478 public void valueChanged(ListSelectionEvent e) { 479 if (!e.getValueIsAdjusting()) 480 selectListener.actionPerformed(null); 481 } 482 }); 483 } 472 484 }
Note:
See TracChangeset
for help on using the changeset viewer.