# HG changeset patch # User Chris Cannam # Date 1431611862 -3600 # Node ID b12cd1c2dad5f82d8185869fd12ced10f4dc1c76 # Parent 6f97f5149cb3149cc45040ddf296a4f05fb9bbe7 Fix #1220 Flexi-note layer appears in Layers menu diff -r 6f97f5149cb3 -r b12cd1c2dad5 layer/LayerFactory.cpp --- a/layer/LayerFactory.cpp Tue May 12 14:25:00 2015 +0100 +++ b/layer/LayerFactory.cpp Thu May 14 14:57:42 2015 +0100 @@ -198,7 +198,10 @@ LayerTypeSet types; types.insert(TimeInstants); types.insert(TimeValues); - types.insert(FlexiNotes); + // Because this is strictly a UI function -- list the layer types + // to show in a menu -- it should not contain FlexiNotes; the + // layer isn't meaningfully editable in SV +// types.insert(FlexiNotes); types.insert(Notes); types.insert(Regions); types.insert(Text); diff -r 6f97f5149cb3 -r b12cd1c2dad5 layer/LayerFactory.h --- a/layer/LayerFactory.h Tue May 12 14:25:00 2015 +0100 +++ b/layer/LayerFactory.h Thu May 14 14:57:42 2015 +0100 @@ -57,6 +57,11 @@ typedef std::set LayerTypeSet; LayerTypeSet getValidLayerTypes(Model *model); + + /** + * Return the set of layer types that an end user should be + * allowed to create, empty, for subsequent editing. + */ LayerTypeSet getValidEmptyLayerTypes(); LayerType getLayerType(const Layer *);