# HG changeset patch # User Chris Cannam # Date 1409671106 -3600 # Node ID 532302d0457188ecb4479c08e71a7dbea14a18fd # Parent d843e6275d0fa22a9ff23f2a0fa68d2171a7c5d0 Add const version of this accessor diff -r d843e6275d0f -r 532302d04571 view/View.cpp --- 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_cast(this)->getInteractionLayer()); +} + Layer * View::getSelectedLayer() { diff -r d843e6275d0f -r 532302d04571 view/View.h --- 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,