mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-28 01:04:41 +08:00
(ProfGraphicsView) Scroll verticalScrollBar to selected item also
This commit is contained in:
parent
c6fb0bfeb9
commit
b2ac7e0fbd
@ -1796,6 +1796,7 @@ void ProfGraphicsView::onSelectedBlockChange(unsigned int _block_index)
|
|||||||
const auto& item = guiblock.graphics_item->items(guiblock.graphics_item_level)[guiblock.graphics_item_index];
|
const auto& item = guiblock.graphics_item->items(guiblock.graphics_item_level)[guiblock.graphics_item_index];
|
||||||
|
|
||||||
m_flickerSpeedX = m_flickerSpeedY = 0;
|
m_flickerSpeedX = m_flickerSpeedY = 0;
|
||||||
|
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_pScrollbar->setValue(item.left() + item.width() * 0.5 - m_pScrollbar->sliderHalfWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user