- Timestamp:
- 2009-11-19T21:58:09+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r2371 r2485 70 70 71 71 abstract public class Main { 72 72 73 73 /** 74 74 * Replies true if JOSM currently displays a map view. False, if it doesn't, i.e. if … … 165 165 public final void setMapFrame(final MapFrame map) { 166 166 MapFrame old = Main.map; 167 Main.map = map;168 167 panel.setVisible(false); 169 168 panel.removeAll(); … … 176 175 panel.setVisible(true); 177 176 redoUndoListener.commandChanged(0,0); 177 178 Main.map = map; 178 179 179 180 PluginHandler.setMapFrame(old, map); … … 414 415 dialog.setVisible(true); 415 416 switch(dialog.getUserAction()) { 416 417 418 417 case CANCEL: return false; 418 case PROCEED: return true; 419 default: return false; 419 420 } 420 421 } … … 481 482 if (st.countTokens() == 4) { 482 483 Bounds b = new Bounds( 483 new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken())),484 new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken()))485 484 new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken())), 485 new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken())) 486 ); 486 487 try { 487 488 DownloadTask task = rawGps ? new DownloadGpsTask() : new DownloadOsmTask(); -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2482 r2485 654 654 } else if (keys == null || keys.length == 0){ 655 655 keys = new String[] {key, value}; 656 keysChangedImpl(); 656 657 } else { 657 658 for (int i=0; i<keys.length;i+=2) { 658 659 if (keys[i].equals(key)) { 659 660 keys[i+1] = value; 661 keysChangedImpl(); 660 662 return; 661 663 } … … 669 671 newKeys[keys.length + 1] = value; 670 672 keys = newKeys; 673 keysChangedImpl(); 671 674 } 672 675 } … … 682 685 if (keys.length == 2) { 683 686 keys = null; 687 keysChangedImpl(); 684 688 return; 685 689 } … … 693 697 } 694 698 keys = newKeys; 699 keysChangedImpl(); 695 700 } 696 701 -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r2484 r2485 18 18 import java.util.HashSet; 19 19 import java.util.List; 20 import java.util.logging.Logger;21 20 22 21 import javax.swing.AbstractAction; … … 62 61 */ 63 62 public class RelationListDialog extends ToggleDialog implements LayerChangeListener, DataSetListener { 64 private static final Logger logger = Logger.getLogger(RelationListDialog.class.getName());63 //private static final Logger logger = Logger.getLogger(RelationListDialog.class.getName()); 65 64 66 65 /** The display list. */ … … 73 72 /** the delete action */ 74 73 private DeleteAction deleteAction; 74 private NewAction newAction; 75 75 /** the popup menu */ 76 76 private RelationDialogPopupMenu popupMenu; … … 101 101 // the new action 102 102 // 103 NewAction newAction = new NewAction(); 104 Layer.listeners.add(newAction); 103 newAction = new NewAction(); 105 104 buttonPanel.add(new SideButton(newAction), GBC.std()); 106 105 … … 134 133 135 134 popupMenu = new RelationDialogPopupMenu(); 136 137 // register as layer listener 138 //135 } 136 137 @Override public void showNotify() { 139 138 Layer.listeners.add(this); 140 } 141 142 @Override public void setVisible(boolean b) { 143 super.setVisible(b); 144 if (b) { 145 updateList(); 146 } 147 } 139 Layer.listeners.add(newAction); 140 for (OsmDataLayer layer:Main.map.mapView.getLayersOfType(OsmDataLayer.class)) { 141 layer.data.addDataSetListener(this); 142 } 143 } 144 145 @Override public void hideNotify() { 146 Layer.listeners.remove(this); 147 Layer.listeners.remove(newAction); 148 for (OsmDataLayer layer:Main.map.mapView.getLayersOfType(OsmDataLayer.class)) { 149 layer.data.removeDataSetListener(this); 150 } 151 } 152 148 153 149 154 protected int getNumRelations() { … … 587 592 public RelationListModel(DefaultListSelectionModel selectionModel) { 588 593 this.selectionModel = selectionModel; 589 }590 591 public ArrayList<Relation> getRelations() {592 return relations;593 594 } 594 595
Note:
See TracChangeset
for help on using the changeset viewer.