Ignore:
Timestamp:
2013-05-13T03:10:05+02:00 (11 years ago)
Author:
Don-vip
Message:
  • Improve PopupMenuLauncher to automatically select JTable/JList/JTree line under cursor
  • Simplify all popup menus with this new feature
  • Remove custom popup menus in BoundingBoxSelection and BoundingBoxSelection to use default text field popup menus recently introduced
  • Fix EDT violations in changeset window
  • Make Autoscale actions publicly available in MainMenu
  • Add a new "Zoom to problem" mode in AutoScaleAction
  • Make "Zoom to problem" menu item in validator dialog use this new feature
  • Update enabled state of "Zoom to Conflict" and "Zoom to problem" against selection of conflict/validator dialog
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java

    r5897 r5958  
    10201020
    10211021    class PopupMenuHandler extends PopupMenuLauncher {
    1022         @Override
    1023         public void launch(MouseEvent evt) {
    1024             Point p = evt.getPoint();
    1025             int index = layerList.rowAtPoint(p);
    1026             if (index < 0) return;
    1027             if (!layerList.getCellRect(index, 2, false).contains(evt.getPoint()))
    1028                 return;
    1029             if (!layerList.isRowSelected(index)) {
    1030                 layerList.setRowSelectionInterval(index, index);
    1031             }
    1032             Layer layer = model.getLayer(index);
    1033             LayerListPopup menu = new LayerListPopup(getModel().getSelectedLayers(), layer);
    1034             menu.show(layerList, p.x, p.y-3);
     1022        @Override public void launch(MouseEvent evt) {
     1023            Layer layer = getModel().getLayer(layerList.getSelectedRow());
     1024            menu = new LayerListPopup(getModel().getSelectedLayers(), layer);
     1025            super.launch(evt);
    10351026        }
    10361027    }
Note: See TracChangeset for help on using the changeset viewer.