Ticket #6629: coloringpatch2patch.patch
File coloringpatch2patch.patch, 2.3 KB (added by , 14 years ago) |
---|
-
org/openstreetmap/josm/gui/preferences/GPXSettingsPanel.java
48 48 private JComboBox waypointLabel = new JComboBox(new String[] {tr("Auto"), /* gpx data field name */ trc("gpx_field", "Name"), 49 49 /* gpx data field name */ trc("gpx_field", "Desc(ription)"), tr("Both"), tr("None")}); 50 50 private String spec; 51 private String specSp = ""; 52 51 53 52 public GPXSettingsPanel(String layerName) { 54 53 super(new GridBagLayout()); 55 54 this.spec="layer "+layerName; 56 specSp = ".layer "+spec;57 55 initComponents(); 58 56 loadPreferences(); 59 57 } … … 82 80 add(new JLabel(tr("Draw lines between raw GPS points")), GBC.eol().insets(20,0,0,0)); 83 81 if (spec!=null) add(drawRawGpsLinesGlobal, GBC.eol().insets(40,0,0,0)); 84 82 add(drawRawGpsLinesNone, GBC.eol().insets(40,0,0,0)); 85 add(drawRawGpsLinesLocal, GBC.eol().insets(40,0,0,0));83 if (spec==null) add(drawRawGpsLinesLocal, GBC.eol().insets(40,0,0,0)); 86 84 add(drawRawGpsLinesAll, GBC.eol().insets(40,0,0,0)); 87 85 88 86 drawRawGpsLinesActionListener = new ActionListener(){ 89 87 public void actionPerformed(ActionEvent e) { 90 88 boolean f=drawRawGpsLinesNone.isSelected()||drawRawGpsLinesGlobal.isSelected(); … … 245 243 colorDynamic.setEnabled(colorTypeVelocity.isSelected() || colorTypeDilution.isSelected()); 246 244 } 247 245 if(spec != null) 248 waypointLabel.setSelectedIndex(Main.pref.getInteger("draw.rawgps.layer.wpt" +specSp, 5));246 waypointLabel.setSelectedIndex(Main.pref.getInteger("draw.rawgps.layer.wpt",spec, 5)); 249 247 else 250 248 waypointLabel.setSelectedIndex(Main.pref.getInteger("draw.rawgps.layer.wpt", 0)); 251 249 } … … 256 254 * if spec==null, global preferences are written 257 255 */ 258 256 public boolean savePreferences (String spec) { 257 String specSp = ".layer "+spec; 259 258 Main.pref.put("marker.makeautomarkers"+specSp, makeAutoMarkers.isSelected()); 260 259 if (drawRawGpsLinesGlobal.isSelected()) { 261 260 Main.pref.put("draw.rawgps.lines"+specSp, null);