Ignore:
Timestamp:
2013-07-08T08:28:17+02:00 (11 years ago)
Author:
akks
Message:

see #7503: allow to disable highlighting of members/primitives (for slow machines)
(using old Draw target highlight option in display preferences)

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  
    116116   
    117117    HighlightHelper highlightHelper = new HighlightHelper();
    118    
     118    private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true);
    119119    /**
    120120     * Constructs <code>RelationListDialog</code>
     
    194194       
    195195        //update highlights
    196         if (focused==displaylist && Main.isDisplayingMapView()) {
     196        if (highlightEnabled && focused==displaylist && Main.isDisplayingMapView()) {
    197197            if (highlightHelper.highlightOnly(sel)) {
    198198                Main.map.mapView.repaint();
     
    316316        @Override
    317317        public void mouseExited(MouseEvent me) {
    318             highlightHelper.clear();
     318            if (highlightEnabled) highlightHelper.clear();
    319319        }
    320320       
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r6038 r6058  
    188188    class MouseEventHandler extends PopupMenuLauncher {
    189189        private final HighlightHelper helper = new HighlightHelper();
    190        
     190        private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true);
    191191        public MouseEventHandler() {
    192192            super(popupMenu);
     
    201201                if (layer == null) return;
    202202                layer.data.setSelected(Collections.singleton((OsmPrimitive)model.getElementAt(idx)));
    203             } else if (Main.isDisplayingMapView()) {
     203            } else if (highlightEnabled && Main.isDisplayingMapView()) {
    204204                if (helper.highlightOnly((OsmPrimitive)model.getElementAt(idx))) {
    205205                    Main.map.mapView.repaint();
     
    210210        @Override
    211211        public void mouseExited(MouseEvent me) {
    212             helper.clear();
     212            if (highlightEnabled) helper.clear();
    213213            super.mouseExited(me);
    214214        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

    r6038 r6058  
    88import java.awt.event.ActionEvent;
    99import java.awt.event.KeyEvent;
    10 import java.awt.event.MouseAdapter;
    11 import java.awt.event.MouseEvent;
    1210import java.util.ArrayList;
    1311import java.util.Arrays;
     
    4543    private ZoomToGapAction zoomToGap;
    4644    private HighlightHelper highlightHelper = new HighlightHelper();
     45    private boolean highlightEnabled;
    4746
    4847    /**
     
    142141   
    143142    private void initHighlighting() {
     143        highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true);
     144        if (!highlightEnabled) return;
    144145        getMemberTableModel().getSelectionModel().addListSelectionListener(highlighterListener);
    145146        if (Main.isDisplayingMapView()) {
     
    158159     */
    159160    class SelectNextColumnCellAction extends AbstractAction {
     161        @Override
    160162        public void actionPerformed(ActionEvent e) {
    161163            run();
     
    212214    public void stopHighlighting() {
    213215        if (highlighterListener == null) return;
     216        if (!highlightEnabled) return;
    214217        getMemberTableModel().getSelectionModel().removeListSelectionListener(highlighterListener);
    215218        highlighterListener = null;
Note: See TracChangeset for help on using the changeset viewer.