- Timestamp:
- 2009-08-02T16:00:53+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r1838 r1880 175 175 super(tr("Layers"), "layerlist", tr("Open a list of all loaded layers."), 176 176 Shortcut.registerShortcut("subwindow:layers", tr("Toggle: {0}", tr("Layers")), KeyEvent.VK_L, Shortcut.GROUP_LAYER), 100); 177 instance = new JList(model); 177 instance = new JList(model) { 178 @Override 179 protected void processMouseEvent(MouseEvent e) { 180 // if the layer list is embedded in a detached dialog, the last row is 181 // is selected if a user clicks in the empty space *below* the last row. 182 // This mouse event filter prevents this. 183 // 184 int idx = locationToIndex(e.getPoint()); 185 if (getCellBounds(idx, idx).contains(e.getPoint())) { 186 super.processMouseEvent(e); 187 } 188 } 189 }; 178 190 listScrollPane = new JScrollPane(instance); 179 191 add(listScrollPane, BorderLayout.CENTER);
Note:
See TracChangeset
for help on using the changeset viewer.