- Timestamp:
- 2012-03-03T11:19:59+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r4932 r5034 101 101 public SelectionListDialog selectionListDialog; 102 102 public PropertiesDialog propertiesDialog; 103 103 104 104 /** 105 105 * The panel list of all toggle dialog icons. To add new toggle dialog actions, use addToggleDialog … … 110 110 111 111 public final ButtonGroup toolGroup = new ButtonGroup(); 112 112 113 113 private List<IconToggleButton> allDialogButtons = new ArrayList<IconToggleButton>(); 114 114 private List<IconToggleButton> allMapModeButtons = new ArrayList<IconToggleButton>(); 115 115 116 116 private final ListAllButtonsAction listAllDialogsAction = new ListAllButtonsAction(allDialogButtons); 117 117 private final ListAllButtonsAction listAllMapModesAction = new ListAllButtonsAction(allMapModeButtons); … … 361 361 listAllMapModesButton.setFont(listAllMapModesButton.getFont().deriveFont(Font.PLAIN)); 362 362 jb.add(listAllMapModesButton); 363 363 364 364 if(Main.pref.getBoolean("sidetoolbar.togglevisible", true)) { 365 365 jb.addSeparator(new Dimension(0,18)); … … 414 414 private JButton button; 415 415 private Collection<? extends HideableButton> buttons; 416 417 416 417 418 418 public ListAllButtonsAction(Collection<? extends HideableButton> buttons) { 419 419 this.buttons = buttons; … … 459 459 toolBarToggle.repaint(); 460 460 for (IconToggleButton b : allMapModeButtons) { 461 461 b.applyButtonHiddenPreferences(); 462 462 } 463 463 toolBarActions.repaint(); 464 464 } 465 465 466 466 /** 467 467 * Replies the instance of a toggle dialog of type <code>type</code> managed by this … … 540 540 // invalidate repaint cache 541 541 Main.map.mapView.preferenceChanged(null); 542 543 // After all listeners notice new layer, some buttons will be disabled/enabled 542 543 // After all listeners notice new layer, some buttons will be disabled/enabled 544 544 // and possibly need to be hidden/shown. 545 545 SwingUtilities.invokeLater(new Runnable() { … … 549 549 }); 550 550 } 551 551 552 552 553 553 private MapMode getLastMapMode(Layer newLayer) { … … 556 556 // if no action is selected - try to select default action 557 557 Action defaultMode = getDefaultButtonAction(); 558 if (defaultMode instanceof MapMode & ((MapMode)defaultMode).layerIsSupported(newLayer)) {558 if (defaultMode instanceof MapMode && ((MapMode)defaultMode).layerIsSupported(newLayer)) { 559 559 mode = (MapMode) defaultMode; 560 560 }
Note:
See TracChangeset
for help on using the changeset viewer.