diff layer/Layer.h @ 949:e3c7da3d896e osx-retina

Merge from default branch
author Chris Cannam
date Mon, 20 Apr 2015 11:00:48 +0100
parents 94e4952a6774 e53a87a5efb2
children c02c51ae5238 a34a2a25907c
line wrap: on
line diff
--- a/layer/Layer.h	Mon Apr 20 11:00:39 2015 +0100
+++ b/layer/Layer.h	Mon Apr 20 11:00:48 2015 +0100
@@ -63,7 +63,7 @@
     Model *getModel() {
 	return const_cast<Model *>(const_cast<const Layer *>(this)->getModel());
     }
-
+    
     /**
      * Return a zoom constraint object defining the supported zoom
      * levels for this layer.  If this returns zero, the layer will
@@ -520,6 +520,13 @@
      */
     virtual RangeMapper *getNewVerticalZoomRangeMapper() const { return 0; }
 
+    /**
+     * Return true if this layer type can function without a model
+     * being set. If false (the default), the layer will not be loaded
+     * from a session if its model cannot be found.
+     */
+    virtual bool canExistWithoutModel() const { return false; }
+
 public slots:
     void showLayer(LayerGeometryProvider *, bool show);