Index: applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java	(revision 22732)
@@ -271,4 +271,5 @@
 			buoy = new BuoyUkn(this, "active layer contains no OSM data");
 			buoy.setNode(null);
+			buoy.paintSign();
 			return;
 		}
@@ -280,4 +281,5 @@
 			buoy = new BuoyUkn(this, "Please select a node");
 			buoy.setNode(null);
+			buoy.paintSign();
 			return;
 		}
@@ -286,4 +288,5 @@
 			buoy = new BuoyUkn(this, "Please select only one node");
 			buoy.setNode(null);
+			buoy.paintSign();
 			return;
 		}
@@ -325,34 +328,53 @@
 
 			if (type.equals("buoy_lateral") || type.equals("beacon_lateral")
-					|| keys.containsKey("seamark:buoy_lateral")
-					|| keys.containsKey("seamark:beacon_lateral")) {
+					|| keys.containsKey("seamark:buoy_lateral:category")
+					|| keys.containsKey("seamark:buoy_lateral:shape")
+					|| keys.containsKey("seamark:buoy_lateral:colour")
+					|| keys.containsKey("seamark:beacon_lateral:category")
+					|| keys.containsKey("seamark:beacon_lateral:shape")
+					|| keys.containsKey("seamark:beacon_lateral:colour")) {
 				buoy = new BuoyLat(this, node);
+				buoy.paintSign();
 				return;
 
 			} else if (type.equals("buoy_cardinal") || type.equals("beacon_cardinal")
-					|| keys.containsKey("seamark:buoy_cardinal")
-					|| keys.containsKey("seamark:beacon_cardinal")) {
+					|| keys.containsKey("seamark:buoy_cardinal:category")
+					|| keys.containsKey("seamark:buoy_cardinal:shape")
+					|| keys.containsKey("seamark:buoy_cardinal:colour")
+					|| keys.containsKey("seamark:beacon_cardinal:category")
+					|| keys.containsKey("seamark:beacon_cardinal:shape")
+					|| keys.containsKey("seamark:beacon_cardinal:colour")) {
 				buoy = new BuoyCard(this, node);
+				buoy.paintSign();
 				return;
 
 			} else if (type.equals("buoy_safe_water")
 					|| type.equals("beacon_safe_water")
-					|| keys.containsKey("seamark:buoy_safe_water")
-					|| keys.containsKey("seamark:beacon_safe_water")) {
+					|| keys.containsKey("seamark:buoy_safe_water:shape")
+					|| keys.containsKey("seamark:buoy_safe_water:colour")
+					|| keys.containsKey("seamark:beacon_safe_water:shape")
+					|| keys.containsKey("seamark:beacon_safe_water:colour")) {
 				buoy = new BuoySaw(this, node);
+				buoy.paintSign();
 				return;
 
 			} else if (type.equals("buoy_special_purpose")
 					|| type.equals("beacon_special_purpose")
-					|| keys.containsKey("seamark:buoy_special_purpose")
-					|| keys.containsKey("seamark:beacon_special_purpose")) {
+					|| keys.containsKey("seamark:buoy_special_purpose:shape")
+					|| keys.containsKey("seamark:buoy_special_purpose:colour")
+					|| keys.containsKey("seamark:beacon_special_purpose:shape")
+					|| keys.containsKey("seamark:beacon_special_purpose:colour")) {
 				buoy = new BuoySpec(this, node);
+				buoy.paintSign();
 				return;
 
 			} else if (type.equals("buoy_isolated_danger")
 					|| type.equals("beacon_isolated_danger")
-					|| (keys.containsKey("seamark:buoy_isolated_danger"))
-					|| (keys.containsKey("seamark:beacon_isolated_danger"))) {
+					|| keys.containsKey("seamark:buoy_isolated_danger:shape")
+					|| keys.containsKey("seamark:buoy_isolated_danger:colour")
+					|| keys.containsKey("seamark:beacon_isolated_danger:shape")
+					|| keys.containsKey("seamark:beacon_isolated_danger:colour")) {
 				buoy = new BuoyIsol(this, node);
+				buoy.paintSign();
 				return;
 
@@ -363,4 +385,5 @@
 							|| str.equals("red;green;red") || str.equals("green;red;green")) {
 						buoy = new BuoyLat(this, node);
+						buoy.paintSign();
 						return;
 					} else if (str.equals("black;yellow")
@@ -368,32 +391,37 @@
 							|| str.equals("yellow;black;yellow")) {
 						buoy = new BuoyCard(this, node);
+						buoy.paintSign();
 						return;
 					} else if (str.equals("black;red;black")) {
 						buoy = new BuoyIsol(this, node);
+						buoy.paintSign();
 						return;
 					} else if (str.equals("red;white")) {
 						buoy = new BuoySaw(this, node);
+						buoy.paintSign();
 						return;
 					} else if (str.equals("yellow")) {
 						buoy = new BuoySaw(this, node);
+						buoy.paintSign();
 						return;
 					} else {
 						buoy = new BuoyUkn(this, "Parse-Error: Invalid colour");
 						buoy.setNode(node);
-						return;
-					}
-				} else if (keys.containsKey("seamark:light_float:topmark")) {
-					if (keys.containsKey("seamark:light_float:topmark:shape")) {
-						str = keys.get("seamark:light_float:topmark:shape");
-						if (str.equals("cylinder") || str.equals("cone, point up")) {
-							buoy = new BuoyLat(this, node);
-							return;
-						}
-					} else if (keys.containsKey("seamark:light_float:topmark:colour")) {
-						str = keys.get("seamark:light_float:topmark:colour");
-						if (str.equals("red") || str.equals("green")) {
-							buoy = new BuoyLat(this, node);
-							return;
-						}
+						buoy.paintSign();
+						return;
+					}
+				} else if (keys.containsKey("seamark:light_float:topmark:shape")) {
+					str = keys.get("seamark:light_float:topmark:shape");
+					if (str.equals("cylinder") || str.equals("cone, point up")) {
+						buoy = new BuoyLat(this, node);
+						buoy.paintSign();
+						return;
+					}
+				} else if (keys.containsKey("seamark:light_float:topmark:colour")) {
+					str = keys.get("seamark:light_float:topmark:colour");
+					if (str.equals("red") || str.equals("green")) {
+						buoy = new BuoyLat(this, node);
+						buoy.paintSign();
+						return;
 					}
 				}
@@ -403,4 +431,5 @@
 		buoy = new BuoyUkn(this, "Seamark not set");
 		buoy.setNode(node);
+		buoy.paintSign();
 		return;
 	}
@@ -556,9 +585,9 @@
 				public void actionPerformed(java.awt.event.ActionEvent e) {
 					Node n;
-					String name;
 					int type = cbM01TypeOfMark.getSelectedIndex();
 
 					if (buoy == null) {
 						buoy = new BuoyUkn(dia, "Seamark not set");
+						buoy.paintSign();
 						return;
 					}
@@ -568,8 +597,5 @@
 					n = buoy.getNode();
 					if (n == null)
-						n = onode;
-					if (n == null)
-						return;
-					name = buoy.getName();
+						return;
 					switch (type) {
 
@@ -615,11 +641,7 @@
 					}
 
-					buoy.setNode(n);
 					buoy.setBuoyIndex(type);
 					buoy.refreshStyles();
 					buoy.refreshLights();
-					buoy.setName(name);
-					if (buoy instanceof BuoyLat)
-						buoy.setLightColour();
 					buoy.paintSign();
 				}
@@ -655,7 +677,4 @@
 						tbM01Region.setText("IALA-A");
 					}
-					if (buoy instanceof BuoyLat)
-						buoy.setLightColour();
-					buoy.paintSign();
 				}
 			});
@@ -698,5 +717,4 @@
 
 					buoy.saveSign();
-					buoy.paintSign();
 				}
 			});
@@ -791,5 +809,4 @@
 				public void focusLost(java.awt.event.FocusEvent e) {
 					buoy.setName(tfM01Name.getText());
-					buoy.paintSign();
 				}
 			});
@@ -958,4 +975,5 @@
 						obuoy = null;
 					}
+					buoy.paintSign();
 				}
 			});
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java	(revision 22732)
@@ -231,4 +231,6 @@
 		dlg.tfM01RepeatTime.setText(LightPeriod);
 
+		dlg.tfM01Name.setText(getName());
+		
 		if (isFired()) {
 			String lp, c;
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java	(revision 22732)
@@ -110,5 +110,5 @@
 			} else
 				setStyleIndex(CARD_BEACON);
-		} else if ((keys.containsKey("seamark:type") == true)
+		} else if (keys.containsKey("seamark:type")
 				&& (keys.get("seamark:type").equals("light_float"))) {
 			setStyleIndex(CARD_FLOAT);
@@ -148,6 +148,4 @@
 			}
 		}
-
-		paintSign();
 	}
 
@@ -278,5 +276,5 @@
 		super.setLightColour("W");
 	}
-	
+
 	public void saveSign() {
 		Node node = getNode();
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java	(revision 22732)
@@ -46,4 +46,17 @@
 		setTopMark(true);
 
+		if (keys.containsKey("name"))
+			setName(keys.get("name"));
+
+		if (keys.containsKey("seamark:name"))
+			setName(keys.get("seamark:name"));
+
+		if (keys.containsKey("seamark:buoy_isolated_danger:name"))
+			setName(keys.get("seamark:buoy_isolated_danger:name"));
+		else if (keys.containsKey("seamark:beacon_isolated_danger:name"))
+			setName(keys.get("seamark:beacon_isolated_danger:name"));
+		else if (keys.containsKey("seamark:light_float:name"))
+			setName(keys.get("seamark:light_float:name"));
+
 		if (keys.containsKey("seamark:buoy_isolated_danger:shape")) {
 			str = keys.get("seamark:buoy_isolated_danger:shape");
@@ -63,5 +76,5 @@
 			} else
 				setStyleIndex(ISOL_BEACON);
-		} else if ((keys.containsKey("seamark:type") == true)
+		} else if (keys.containsKey("seamark:type")
 				&& (keys.get("seamark:type").equals("light_float"))) {
 			setStyleIndex(CARD_FLOAT);
@@ -90,6 +103,4 @@
 			}
 		}
-
-		paintSign();
 	}
 
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java	(revision 22732)
@@ -219,5 +219,5 @@
 			} else
 				setStyleIndex(LAT_BEACON);
-		} else if ((keys.containsKey("seamark:type") == true)
+		} else if (keys.containsKey("seamark:type")
 				&& (keys.get("seamark:type").equals("light_float"))) {
 			setStyleIndex(LAT_FLOAT);
@@ -266,6 +266,4 @@
 			setLightPeriod(keys);
 		}
-
-		paintSign();
 	}
 
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java	(revision 22732)
@@ -46,4 +46,17 @@
 		setLightColour("W");
 		setBuoyIndex(SAFE_WATER);
+
+		if (keys.containsKey("name"))
+			setName(keys.get("name"));
+
+		if (keys.containsKey("seamark:name"))
+			setName(keys.get("seamark:name"));
+
+		if (keys.containsKey("seamark:buoy_safe_water:name"))
+			setName(keys.get("seamark:buoy_safe_water:name"));
+		else if (keys.containsKey("seamark:beacon_safe_water:name"))
+			setName(keys.get("seamark:beacon_safe_water:name"));
+		else if (keys.containsKey("seamark:light_float:name"))
+			setName(keys.get("seamark:light_float:name"));
 
 		if (keys.containsKey("seamark:buoy_safe_water:shape")) {
@@ -89,6 +102,4 @@
 			}
 		}
-
-		paintSign();
 	}
 
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java	(revision 22732)
@@ -16,5 +16,5 @@
 
 public class BuoySpec extends Buoy {
-	public BuoySpec(SmpDialogAction dia,  Node node) {
+	public BuoySpec(SmpDialogAction dia, Node node) {
 		super(dia);
 
@@ -56,4 +56,17 @@
 		setBuoyIndex(SPECIAL_PURPOSE);
 
+		if (keys.containsKey("name"))
+			setName(keys.get("name"));
+
+		if (keys.containsKey("seamark:name"))
+			setName(keys.get("seamark:name"));
+
+		if (keys.containsKey("seamark:buoy_special_purpose:name"))
+			setName(keys.get("seamark:buoy_special_purpose:name"));
+		else if (keys.containsKey("seamark:beacon_special_purpose:name"))
+			setName(keys.get("seamark:beacon_special_purpose:name"));
+		else if (keys.containsKey("seamark:light_float:name"))
+			setName(keys.get("seamark:light_float:name"));
+
 		if (keys.containsKey("seamark:buoy_special_purpose:shape")) {
 			str = keys.get("seamark:buoy_special_purpose:shape");
@@ -69,8 +82,10 @@
 		}
 
-		if (keys.containsKey("seamark:beacon_special_purpose"))
+		if ((keys.containsKey("seamark:type") && keys.get("seamark:type").equals(
+				"beacon_special_purpose"))
+				|| keys.containsKey("seamark:special_purpose_beacon:colour")
+				|| keys.containsKey("seamark:special_purpose_beacon:shape"))
 			setStyleIndex(SPEC_BEACON);
-		else if (keys.containsKey("seamark:light_float")
-				&& keys.containsKey("seamark:light_float:colour")
+		else if (keys.containsKey("seamark:light_float:colour")
 				&& keys.get("seamark:light_float:colour").equals("yellow"))
 			setStyleIndex(SPEC_FLOAT);
@@ -104,6 +119,4 @@
 			}
 		}
-
-		paintSign();
 	}
 
Index: applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java
===================================================================
--- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 22725)
+++ applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyUkn.java	(revision 22732)
@@ -31,6 +31,4 @@
 		setValid(false);
 		setBuoyIndex(0);
-
-		paintSign();
 	}
 
