Index: org/openstreetmap/josm/gui/preferences/GPXSettingsPanel.java
===================================================================
--- org/openstreetmap/josm/gui/preferences/GPXSettingsPanel.java	(revision 4272)
+++ org/openstreetmap/josm/gui/preferences/GPXSettingsPanel.java	(working copy)
@@ -48,12 +48,10 @@
     private JComboBox waypointLabel = new JComboBox(new String[] {tr("Auto"), /* gpx data field name */ trc("gpx_field", "Name"),
             /* gpx data field name */ trc("gpx_field", "Desc(ription)"), tr("Both"), tr("None")});
     private String spec;
-    private String specSp = "";
-
+    
     public GPXSettingsPanel(String layerName) {
         super(new GridBagLayout());
         this.spec="layer "+layerName;
-        specSp = ".layer "+spec;
         initComponents();
         loadPreferences();
     }
@@ -82,9 +80,9 @@
         add(new JLabel(tr("Draw lines between raw GPS points")), GBC.eol().insets(20,0,0,0));
         if (spec!=null) add(drawRawGpsLinesGlobal, GBC.eol().insets(40,0,0,0));
         add(drawRawGpsLinesNone, GBC.eol().insets(40,0,0,0));
-        add(drawRawGpsLinesLocal, GBC.eol().insets(40,0,0,0));
+        if (spec==null) add(drawRawGpsLinesLocal, GBC.eol().insets(40,0,0,0));
         add(drawRawGpsLinesAll, GBC.eol().insets(40,0,0,0));
-
+        
         drawRawGpsLinesActionListener = new ActionListener(){
             public void actionPerformed(ActionEvent e) {
                 boolean f=drawRawGpsLinesNone.isSelected()||drawRawGpsLinesGlobal.isSelected();
@@ -245,7 +243,7 @@
             colorDynamic.setEnabled(colorTypeVelocity.isSelected() || colorTypeDilution.isSelected());
         }
         if(spec != null)
-          waypointLabel.setSelectedIndex(Main.pref.getInteger("draw.rawgps.layer.wpt"+specSp, 5));
+          waypointLabel.setSelectedIndex(Main.pref.getInteger("draw.rawgps.layer.wpt",spec, 5));
         else
           waypointLabel.setSelectedIndex(Main.pref.getInteger("draw.rawgps.layer.wpt", 0));
     }
@@ -256,6 +254,7 @@
      * if spec==null, global preferences are written
      */
     public boolean savePreferences (String spec) {
+        String specSp = ".layer "+spec;
         Main.pref.put("marker.makeautomarkers"+specSp, makeAutoMarkers.isSelected());
         if (drawRawGpsLinesGlobal.isSelected()) {
             Main.pref.put("draw.rawgps.lines"+specSp, null);
