Changeset 11090 in josm
- Timestamp:
- 2016-10-07T19:57:30+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintSettings.java
r11060 r11090 26 26 /** Preference: should the segment numbers of ways be displayed */ 27 27 private boolean showOrderNumber; 28 /** Preference: should the segment numbers of ways be displayed on selected way */ 29 private boolean showOrderNumberOnSelectedWay; 28 30 /** Preference: should only the last arrow of a way be displayed */ 29 31 private boolean showHeadArrowOnly; … … 90 92 91 93 showOrderNumber = Main.pref.getBoolean("draw.segment.order_number", false); 94 showOrderNumberOnSelectedWay = Main.pref.getBoolean("draw.segment.order_number.on_selected", false); 92 95 showHeadArrowOnly = Main.pref.getBoolean("draw.segment.head_only", false); 93 96 … … 233 236 public boolean isShowOrderNumber() { 234 237 return showOrderNumber; 238 } 239 240 /** 241 * Determines if the segment numbers of the selected way should be displayed 242 * @return {@code true} if the segment numbers of the selected way should be displayed 243 */ 244 public boolean isShowOrderNumberOnSelectedWay() { 245 return showOrderNumberOnSelectedWay; 235 246 } 236 247 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
r10884 r11090 60 60 /** Preference: should the segment numbers of ways be displayed */ 61 61 protected boolean showOrderNumber; 62 /** Preference: should the segment numbers of the selected be displayed */ 63 protected boolean showOrderNumberOnSelectedWay; 62 64 /** Preference: should selected nodes be filled */ 63 65 protected boolean fillSelectedNode; … … 134 136 showHeadArrowOnly = settings.isShowHeadArrowOnly(); 135 137 showOrderNumber = settings.isShowOrderNumber(); 138 showOrderNumberOnSelectedWay = settings.isShowOrderNumberOnSelectedWay(); 136 139 selectedNodeSize = settings.getSelectedNodeSize(); 137 140 unselectedNodeSize = settings.getUnselectedNodeSize(); … … 321 324 drawSegment(lastP, p, wayColor, 322 325 showOnlyHeadArrowOnly ? !it.hasNext() : showThisDirectionArrow); 323 if ( showOrderNumber&& !isInactiveMode) {326 if ((showOrderNumber || (showOrderNumberOnSelectedWay && w.isSelected())) && !isInactiveMode) { 324 327 drawOrderNumber(lastP, p, orderNumber, g.getColor()); 325 328 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java
r10748 r11090 116 116 showOnlyHeadArrowOnly, showOneway, onewayReversed); 117 117 118 if (paintSettings.isShowOrderNumber() && !painter.isInactiveMode()) { 118 if ((paintSettings.isShowOrderNumber() || (paintSettings.isShowOrderNumberOnSelectedWay() && selected)) 119 && !painter.isInactiveMode()) { 119 120 int orderNumber = 0; 120 121 lastN = null; -
trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
r10611 r11090 43 43 private final JCheckBox onewayArrow = new JCheckBox(tr("Draw oneway arrows.")); 44 44 private final JCheckBox segmentOrderNumber = new JCheckBox(tr("Draw segment order numbers")); 45 private final JCheckBox segmentOrderNumberOnSelectedWay = new JCheckBox(tr("Draw segment order numbers on selected way")); 45 46 private final JCheckBox sourceBounds = new JCheckBox(tr("Draw boundaries of downloaded data")); 46 47 private final JCheckBox virtualNodes = new JCheckBox(tr("Draw virtual nodes in select mode")); … … 92 93 segmentOrderNumber.setToolTipText(tr("Draw the order numbers of all segments within their way.")); 93 94 segmentOrderNumber.setSelected(Main.pref.getBoolean("draw.segment.order_number", false)); 95 segmentOrderNumberOnSelectedWay.setToolTipText(tr("Draw the order numbers of all segments within their way.")); 96 segmentOrderNumberOnSelectedWay.setSelected(Main.pref.getBoolean("draw.segment.order_number.on_selected", false)); 94 97 95 98 // downloaded area … … 136 139 panel.add(onewayArrow, GBC.eop().insets(20, 0, 0, 0)); 137 140 panel.add(segmentOrderNumber, GBC.eop().insets(20, 0, 0, 0)); 141 panel.add(segmentOrderNumberOnSelectedWay, GBC.eop().insets(20, 0, 0, 0)); 138 142 139 143 panel.add(new JLabel(tr("Select and draw mode options")), … … 176 180 Main.pref.put("draw.oneway", onewayArrow.isSelected()); 177 181 Main.pref.put("draw.segment.order_number", segmentOrderNumber.isSelected()); 182 Main.pref.put("draw.segment.order_number.on_selected", segmentOrderNumberOnSelectedWay.isSelected()); 178 183 Main.pref.put("draw.data.downloaded_area", sourceBounds.isSelected()); 179 184 Main.pref.put("draw.data.inactive_color", inactive.isSelected());
Note:
See TracChangeset
for help on using the changeset viewer.