diff --git a/common/view/view.cpp b/common/view/view.cpp index 22fe7fe671..364da756a6 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -451,7 +451,7 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) con for( i = m_orderedLayers.rbegin(); i != m_orderedLayers.rend(); ++i ) { // ignore layers that do not contain actual items (i.e. the selection box, menus, floats) - if( ( *i )->displayOnly ) + if( ( *i )->displayOnly || !( *i )->visible ) continue; queryVisitor > visitor( aResult, ( *i )->id );