changeset 841:532302d04571

Add const version of this accessor
author Chris Cannam
date Tue, 02 Sep 2014 16:18:26 +0100
parents d843e6275d0f
children 8432d2551fb2 db0759e4c6c3
files view/View.cpp view/View.h
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/view/View.cpp	Tue Sep 02 16:14:22 2014 +0100
+++ b/view/View.cpp	Tue Sep 02 16:18:26 2014 +0100
@@ -666,6 +666,12 @@
     return 0;
 }
 
+const Layer *
+View::getInteractionLayer() const
+{
+    return const_cast<const Layer *>(const_cast<View *>(this)->getInteractionLayer());
+}
+
 Layer *
 View::getSelectedLayer()
 {
--- a/view/View.h	Tue Sep 02 16:14:22 2014 +0100
+++ b/view/View.h	Tue Sep 02 16:18:26 2014 +0100
@@ -195,6 +195,8 @@
      */
     virtual Layer *getInteractionLayer();
 
+    virtual const Layer *getInteractionLayer() const;
+
     /**
      * Return the layer most recently selected by the user. This is
      * the layer that any non-tool-driven commands should operate on,