- Timestamp:
- 2012-03-28T20:30:52+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r5030 r5127 267 267 layerList.getActionMap().put("deleteLayer", deleteLayerAction); 268 268 adaptTo(deleteLayerAction, selectionModel); 269 getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( 270 KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),"delete" 271 ); 272 getActionMap().put("delete", deleteLayerAction); 273 269 274 270 275 createLayout(layerList, true, Arrays.asList(new SideButton[] { … … 592 597 public void actionPerformed(ActionEvent e) { 593 598 slider.setValue((int)Math.round(getOpacity()*100)); 594 popup.show(opacityButton, 0, opacityButton.getHeight()); 599 if (e.getSource() == opacityButton) { 600 popup.show(opacityButton, 0, opacityButton.getHeight()); 601 } else { 602 // Action can be trigger either by opacity button or by popup menu (in case toggle buttons are hidden). 603 // In that case, show it in the middle of screen (because opacityButton is not visible) 604 popup.show(Main.parent, Main.parent.getWidth() / 2, (Main.parent.getHeight() - popup.getHeight()) / 2); 605 } 595 606 } 596 607
Note:
See TracChangeset
for help on using the changeset viewer.