0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 00:31:02 +08:00

(ProfGraphicsView) Updating scene rect when scrolling to selected item;

This commit is contained in:
Victor Zarubkin 2016-08-09 00:15:40 +03:00
parent 97d009bd46
commit af2e606e08

View File

@ -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<int>(item.top() - m_visibleSceneRect.height() * 0.5));
m_pScrollbar->setValue(item.left() + item.width() * 0.5 - m_pScrollbar->sliderHalfWidth());
m_bUpdatingRect = false;
}
updateVisibleSceneRect();
updateScene();
}
}