- Timestamp:
- 2009-09-19T10:55:26+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r2039 r2159 8 8 import java.awt.GridLayout; 9 9 import java.awt.Point; 10 import java.awt.Rectangle; 10 11 import java.awt.event.ActionEvent; 11 12 import java.awt.event.KeyEvent; … … 18 19 import java.util.List; 19 20 import java.util.concurrent.CopyOnWriteArrayList; 20 import java.util.logging.Logger;21 21 22 22 import javax.swing.AbstractAction; … … 28 28 import javax.swing.JLabel; 29 29 import javax.swing.JList; 30 import javax.swing.JOptionPane;31 30 import javax.swing.JPanel; 32 31 import javax.swing.JScrollPane; … … 42 41 import org.openstreetmap.josm.Main; 43 42 import org.openstreetmap.josm.actions.MergeLayerAction; 44 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;45 import org.openstreetmap.josm.gui.ExtendedDialog;46 43 import org.openstreetmap.josm.gui.MapFrame; 47 44 import org.openstreetmap.josm.gui.MapView; … … 57 54 /** 58 55 * This is a toggle dialog which displays the list of layers. Actions allow to 59 * change the ordering the layer, to hide/show layers, to activate layers56 * change the ordering of the layers, to hide/show layers, to activate layers, 60 57 * and to delete layers. 61 58 * … … 317 314 dialog.setVisible(true); 318 315 switch(dialog.getUserAction()) { 319 case CANCEL: return false;320 case PROCEED: return true;321 default: return false;316 case CANCEL: return false; 317 case PROCEED: return true; 318 default: return false; 322 319 } 323 320 } … … 1031 1028 protected void processMouseEvent(MouseEvent e) { 1032 1029 // if the layer list is embedded in a detached dialog, the last row is 1033 // isselected if a user clicks in the empty space *below* the last row.1030 // selected if a user clicks in the empty space *below* the last row. 1034 1031 // This mouse event filter prevents this. 1035 1032 // 1036 1033 int idx = locationToIndex(e.getPoint()); 1037 if (getCellBounds(idx, idx).contains(e.getPoint())) { 1034 // sometimes bounds can be null, see #3539 1035 Rectangle bounds = getCellBounds(idx,idx); 1036 if (bounds != null && bounds.contains(e.getPoint())) { 1038 1037 super.processMouseEvent(e); 1039 1038 }
Note:
See TracChangeset
for help on using the changeset viewer.