Changeset 8988 in josm


Ignore:
Timestamp:
2015-11-04T18:37:49+01:00 (4 years ago)
Author:
simon04
Message:

fix #12028 - Way splitting: fix dialog layout problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java

    r8978 r8988  
    222222        final JList<Way> list;
    223223        final List<OsmPrimitive> selection;
     224        final Way wayToKeep;
    224225
    225226        SegmentToKeepSelectionDialog(Way selectedWay, List<Way> newWays, Way wayToKeep, List<OsmPrimitive> selection) {
     
    230231            this.newWays = newWays;
    231232            this.selection = selection;
     233            this.wayToKeep = wayToKeep;
    232234            this.list = new JList<>(newWays.toArray(new Way[newWays.size()]));
    233             this.list.setSelectedValue(wayToKeep, true);
     235            configureList();
    234236
    235237            setButtonIcons(new String[]{"ok", "cancel"});
     
    282284            super.setVisible(visible);
    283285            if (visible) {
    284                 configureList(); // not in constructor to not highlight segments unless dialog is shown
    285                 list.setSelectedIndex(list.getSelectedIndex()); // highlight way segments
     286                list.setSelectedValue(wayToKeep, true);
    286287            } else {
    287288                setHighlightedWaySegments(Collections.<WaySegment>emptyList());
Note: See TracChangeset for help on using the changeset viewer.