Changeset 9686 in josm


Ignore:
Timestamp:
2016-01-30T15:35:07+01:00 (7 years ago)
Author:
bastiK
Message:

applied #12460 - choose color with double-click (patch by kolesar)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java

    r9223 r9686  
    1010import java.awt.event.ActionEvent;
    1111import java.awt.event.ActionListener;
     12import java.awt.event.MouseAdapter;
     13import java.awt.event.MouseEvent;
    1214import java.util.ArrayList;
    1315import java.util.HashMap;
     
    221223            }
    222224        };
     225        colors.addMouseListener(new MouseAdapter() {
     226            @Override
     227            public void mousePressed(MouseEvent me) {
     228                if (me.getClickCount() == 2) {
     229                    colorEdit.doClick();
     230                }
     231            }
     232        });
    223233        colors.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    224234        final TableCellRenderer oldColorsRenderer = colors.getDefaultRenderer(Object.class);
Note: See TracChangeset for help on using the changeset viewer.