Mercurial > hg > svgui
changeset 962:b12cd1c2dad5
Fix #1220 Flexi-note layer appears in Layers menu
author | Chris Cannam |
---|---|
date | Thu, 14 May 2015 14:57:42 +0100 |
parents | 6f97f5149cb3 |
children | fa96108d552d 73b0dc7d6ec1 |
files | layer/LayerFactory.cpp layer/LayerFactory.h |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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<LayerType> 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 *);