- Timestamp:
- 2010-01-28T19:55:32+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2890 r2903 554 554 } 555 555 556 // FIXME: incline=\"-*\" search pattern does not work. 556 557 String reversedDirectionDefault = "oneway=\"-1\" | incline=down | incline=\"-*\""; 557 String directionDefault = "oneway? | incline=* | aerialway=* | waterway=stream | waterway=river | waterway=canal | waterway=drain | waterway=rapids | \"piste:type\"=downhill | \"piste:type\"=sled | man_made=\"piste:halfpipe\" "; 558 559 String directionDefault = "oneway? | incline=* | aerialway=* | "+ 560 "waterway=stream | waterway=river | waterway=canal | waterway=drain | waterway=rapids | "+ 561 "\"piste:type\"=downhill | \"piste:type\"=sled | man_made=\"piste:halfpipe\" | "+ 562 "junction=roundabout"; 558 563 559 564 try { -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r2869 r2903 258 258 list.setElementAt(osm, i++); 259 259 } 260 if (selectionHistory != null && newSelection.size() > 0 && !newSelection.equals(historyIgnoreSelection)) {261 historyIgnoreSelection = null;262 try {263 // Check if the newSelection has already been added to the history264 Collection<? extends OsmPrimitive> first = selectionHistory.getFirst();265 if (first.equals(newSelection))266 return;267 } catch (NoSuchElementException e) {268 }269 selectionHistory.addFirst(newSelection);270 while (selectionHistory.size() > SELECTION_HISTORY_SIZE) {271 selectionHistory.removeLast();272 }273 }274 260 275 261 int ways = 0; … … 290 276 } else { 291 277 setTitle(tr("Selection")); 278 } 279 280 if (selectionHistory != null && newSelection.size() > 0 && !newSelection.equals(historyIgnoreSelection)) { 281 historyIgnoreSelection = null; 282 try { 283 // Check if the newSelection has already been added to the history 284 Collection<? extends OsmPrimitive> first = selectionHistory.getFirst(); 285 if (first.equals(newSelection)) 286 return; 287 } catch (NoSuchElementException e) { 288 } 289 selectionHistory.addFirst(newSelection); 290 while (selectionHistory.size() > SELECTION_HISTORY_SIZE) { 291 selectionHistory.removeLast(); 292 } 292 293 } 293 294 } -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r2889 r2903 8 8 9 9 import java.awt.Component; 10 import java.awt.Container; 10 11 import java.awt.GridBagLayout; 11 12 import java.awt.Image; … … 702 703 } 703 704 705 JPanel items = new JPanel(new GridBagLayout()); 704 706 for (Item i : data){ 705 707 if(i instanceof Link) { 706 708 l.add(i); 707 709 } else { 708 if(i.addToPanel( p, selected)) {710 if(i.addToPanel(items, selected)) { 709 711 p.hasElements = true; 710 712 } 711 713 } 712 714 } 715 p.add(items, GBC.eol().fill()); 716 if (selected.size() == 0) { 717 setEnabledRec(items, false); 718 } 719 713 720 for(Item link : l) { 714 721 link.addToPanel(p, selected); 715 722 } 723 716 724 return p; 725 } 726 727 /** 728 * setEnabled() does not propagate to child elements, so we need this workaround. 729 */ 730 static void setEnabledRec(Container root, boolean enabled) { 731 root.setEnabled(enabled); 732 Component children[] = root.getComponents(); 733 for(int i = 0; i < children.length; i++) { 734 if(children[i] instanceof Container) { 735 setEnabledRec((Container)children[i], enabled); 736 } else { 737 children[i].setEnabled(enabled); 738 } 739 } 717 740 } 718 741
Note:
See TracChangeset
for help on using the changeset viewer.