From dea793209def1e8edde8ba2adf54b7f15466c717 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 13:14:57 +0200 Subject: [PATCH] VIEW: added GetTopLayer() method --- common/view/view.cpp | 8 ++++++++ include/view/view.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/common/view/view.cpp b/common/view/view.cpp index 4409806c3c..ca21e29ed8 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -452,6 +452,14 @@ void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) m_layers[aLayer].items->Query( r, visitor ); } +int VIEW::GetTopLayer( ) const +{ + if( m_topLayers.size() == 0 ) + return 0; + + return *m_topLayers.begin(); +} + void VIEW::SetTopLayer( int aLayer, bool aEnabled ) { diff --git a/include/view/view.h b/include/view/view.h index 5013fdaf91..714283ef44 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -362,6 +362,8 @@ public: */ void EnableTopLayer( bool aEnable ); + int GetTopLayer() const; + /** * Function ClearTopLayers() * Removes all layers from the on-the-top set (they are no longer displayed over the rest of