From: amwaterhouse Date: Fri, 19 Aug 2005 08:50:53 +0000 (+0000) Subject: remove property user_defined if none left X-Git-Tag: Release_2_04~35 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a67402c4b5b2bc1c97d2624af72c941dec51ea40;p=jalview.git remove property user_defined if none left --- diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 2182b2c..79df106 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -551,7 +551,11 @@ public class UserDefinedColours extends GUserDefinedColours } if (!files.equals(coloursFound.toString())) { - jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound.toString()); + if (coloursFound.toString().length() > 1) + jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", + coloursFound.toString()); + else + jalview.bin.Cache.applicationProperties.remove("USER_DEFINED_COLOURS"); } } @@ -587,7 +591,10 @@ public class UserDefinedColours extends GUserDefinedColours } } - jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound.toString()); + if (coloursFound.toString().length() > 1) + jalview.bin.Cache.setProperty("USER_DEFINED_COLOURS", coloursFound.toString()); + else + jalview.bin.Cache.applicationProperties.remove("USER_DEFINED_COLOURS"); } }