Changeset 6058 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2013-07-08T08:28:17+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r6038 r6058 116 116 117 117 HighlightHelper highlightHelper = new HighlightHelper(); 118 118 private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true); 119 119 /** 120 120 * Constructs <code>RelationListDialog</code> … … 194 194 195 195 //update highlights 196 if ( focused==displaylist && Main.isDisplayingMapView()) {196 if (highlightEnabled && focused==displaylist && Main.isDisplayingMapView()) { 197 197 if (highlightHelper.highlightOnly(sel)) { 198 198 Main.map.mapView.repaint(); … … 316 316 @Override 317 317 public void mouseExited(MouseEvent me) { 318 highlightHelper.clear();318 if (highlightEnabled) highlightHelper.clear(); 319 319 } 320 320 -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r6038 r6058 188 188 class MouseEventHandler extends PopupMenuLauncher { 189 189 private final HighlightHelper helper = new HighlightHelper(); 190 190 private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true); 191 191 public MouseEventHandler() { 192 192 super(popupMenu); … … 201 201 if (layer == null) return; 202 202 layer.data.setSelected(Collections.singleton((OsmPrimitive)model.getElementAt(idx))); 203 } else if ( Main.isDisplayingMapView()) {203 } else if (highlightEnabled && Main.isDisplayingMapView()) { 204 204 if (helper.highlightOnly((OsmPrimitive)model.getElementAt(idx))) { 205 205 Main.map.mapView.repaint(); … … 210 210 @Override 211 211 public void mouseExited(MouseEvent me) { 212 helper.clear();212 if (highlightEnabled) helper.clear(); 213 213 super.mouseExited(me); 214 214 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
r6038 r6058 8 8 import java.awt.event.ActionEvent; 9 9 import java.awt.event.KeyEvent; 10 import java.awt.event.MouseAdapter;11 import java.awt.event.MouseEvent;12 10 import java.util.ArrayList; 13 11 import java.util.Arrays; … … 45 43 private ZoomToGapAction zoomToGap; 46 44 private HighlightHelper highlightHelper = new HighlightHelper(); 45 private boolean highlightEnabled; 47 46 48 47 /** … … 142 141 143 142 private void initHighlighting() { 143 highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true); 144 if (!highlightEnabled) return; 144 145 getMemberTableModel().getSelectionModel().addListSelectionListener(highlighterListener); 145 146 if (Main.isDisplayingMapView()) { … … 158 159 */ 159 160 class SelectNextColumnCellAction extends AbstractAction { 161 @Override 160 162 public void actionPerformed(ActionEvent e) { 161 163 run(); … … 212 214 public void stopHighlighting() { 213 215 if (highlighterListener == null) return; 216 if (!highlightEnabled) return; 214 217 getMemberTableModel().getSelectionModel().removeListSelectionListener(highlighterListener); 215 218 highlighterListener = null;
Note:
See TracChangeset
for help on using the changeset viewer.