From 46c4867b2d5b380dd6369347cca62a353ffc1eec Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Wed, 7 Dec 2016 22:35:37 +0300 Subject: [PATCH] (EasyHystogramItem) updating image after window resize --- profiler_gui/easy_graphics_scrollbar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/profiler_gui/easy_graphics_scrollbar.cpp b/profiler_gui/easy_graphics_scrollbar.cpp index cca9f99..9b2feaa 100644 --- a/profiler_gui/easy_graphics_scrollbar.cpp +++ b/profiler_gui/easy_graphics_scrollbar.cpp @@ -501,7 +501,7 @@ void EasyHystogramItem::paintById(QPainter* _painter) minimum *= 1e3; const auto maximum = minimum + range * 1e3; const auto realScale = currentScale * slider_k; - const auto offset = minimum * realScale; + const auto offset = minimum * realScale + 9e3; auto first = ::std::lower_bound(items.begin(), items.end(), minimum + EASY_GLOBALS.begin_time, [](::profiler::block_index_t _item, qreal _value) { @@ -1468,6 +1468,9 @@ void EasyGraphicsScrollbar::onWindowWidthChange(qreal _width) } scale(m_windowScale / oldScale, 1); + + if (m_hystogramItem->isVisible()) + m_hystogramItem->updateImage(); } //////////////////////////////////////////////////////////////////////////