* split frame with 'protein scaled to codons' and 'auto id width'
*/
- final boolean autoIdWidth = Cache.getDefault("FIGURE_AUTOIDWIDTH",
- false);
+ final String autoIdWidth = Cache.getProperty("FIGURE_AUTOIDWIDTH");
final Integer fixedIdWidth = Cache
.getIntegerProperty("FIGURE_FIXEDIDWIDTH");
complement = ((AlignViewport) av.getCodingComplement())
.getAlignPanel();
dim2 = complement.getAlignmentDimension();
- if (autoIdWidth && av.isScaleProteinAsCdna())
+ if (Boolean.valueOf(autoIdWidth) && av.isScaleProteinAsCdna())
{
int w1 = this.getVisibleIdWidth(false);
int w2 = complement.getVisibleIdWidth(false);
/*
* restore preference settings in case they were fudged
*/
- Cache.setProperty("FIGURE_AUTOIDWIDTH",
- String.valueOf(autoIdWidth));
- Cache.setProperty("FIGURE_FIXEDIDWIDTH",
- String.valueOf(fixedIdWidth));
+ if (autoIdWidth == null)
+ {
+ Cache.removeProperty("FIGURE_AUTOIDWIDTH");
+ }
+ else
+ {
+ Cache.setProperty("FIGURE_AUTOIDWIDTH", autoIdWidth);
+ }
+ if (fixedIdWidth == null)
+ {
+ Cache.removeProperty("FIGURE_FIXEDIDWIDTH");
+ }
+ else
+ {
+ Cache.setProperty("FIGURE_FIXEDIDWIDTH",
+ String.valueOf(fixedIdWidth));
+ }
}
}