From af2e606e08b2e2b0b862bc7b308f7c74547a1cca Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Tue, 9 Aug 2016 00:15:40 +0300 Subject: [PATCH] (ProfGraphicsView) Updating scene rect when scrolling to selected item; --- profiler_gui/blocks_graphics_view.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiler_gui/blocks_graphics_view.cpp b/profiler_gui/blocks_graphics_view.cpp index 41ac8e9..7be70ec 100644 --- a/profiler_gui/blocks_graphics_view.cpp +++ b/profiler_gui/blocks_graphics_view.cpp @@ -1796,10 +1796,14 @@ void ProfGraphicsView::onSelectedBlockChange(unsigned int _block_index) const auto& item = guiblock.graphics_item->items(guiblock.graphics_item_level)[guiblock.graphics_item_index]; m_flickerSpeedX = m_flickerSpeedY = 0; + + m_bUpdatingRect = true; verticalScrollBar()->setValue(static_cast(item.top() - m_visibleSceneRect.height() * 0.5)); m_pScrollbar->setValue(item.left() + item.width() * 0.5 - m_pScrollbar->sliderHalfWidth()); + m_bUpdatingRect = false; } + updateVisibleSceneRect(); updateScene(); } }