fix for updating model-view matrix

This commit is contained in:
Roman Sorokin 2014-07-25 12:45:59 +03:00 committed by Alex Zolotarev
parent f08b054e40
commit 3327a811e1
2 changed files with 6 additions and 3 deletions

View file

@ -2,15 +2,17 @@
#include "../std/bind.hpp"
void OverlayTree::StartOverlayPlacing(ScreenBase const & screen)
void OverlayTree::StartOverlayPlacing(ScreenBase const & screen, bool canOverlap)
{
m_modelView = screen;
m_canOverlap = canOverlap;
ASSERT(m_tree.empty(), ());
}
void OverlayTree::Add(RefPointer<OverlayHandle> handle)
{
handle->SetIsVisible(false);
handle->SetIsVisible(m_canOverlap);
handle->Update(m_modelView);
m2::RectD pixelRect = handle->GetPixelRect(m_modelView);
find_result_t elements;

View file

@ -10,7 +10,7 @@
class OverlayTree
{
public:
void StartOverlayPlacing(ScreenBase const & screen);
void StartOverlayPlacing(ScreenBase const & screen, bool canOverlap = false);
void Add(RefPointer<OverlayHandle> handle);
void EndOverlayPlacing();
@ -30,6 +30,7 @@ private:
ScreenBase m_modelView;
typedef KDTree::KDTree<4, Node> tree_t;
tree_t m_tree;
bool m_canOverlap;
private:
typedef buffer_vector<Node const *, 8> find_result_t;