diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 401a1f83..252d60eb 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -799,6 +799,7 @@ bool View::DrawImpl() } ImGui::EndPopup(); } + m_setRangePopupOpen = ImGui::IsPopupOpen( "SetZoneRange" ); if( m_zoomAnim.active ) { @@ -3228,6 +3229,14 @@ void View::DrawZones() draw->AddLine( ImVec2( wpos.x + px1, linepos.y ), ImVec2( wpos.x + px1, linepos.y + lineh ), m_statRange.hiMax ? 0x998888EE : 0x338888EE, m_statRange.hiMax ? 2 : 1 ); } + if( m_setRangePopup.active || m_setRangePopupOpen ) + { + const auto s = std::min( m_setRangePopup.min, m_setRangePopup.max ); + const auto e = std::max( m_setRangePopup.min, m_setRangePopup.max ); + DrawStripedRect( draw, wpos.x + ( s - m_vd.zvStart ) * pxns, linepos.y, wpos.x + ( e - m_vd.zvStart ) * pxns, linepos.y + lineh, 5 * ImGui::GetTextLineHeight() / 15.f, 0x55DD8888 ); + draw->AddRect( ImVec2( wpos.x + ( s - m_vd.zvStart ) * pxns, linepos.y ), ImVec2( wpos.x + ( e - m_vd.zvStart ) * pxns, linepos.y + lineh ), 0x77DD8888 ); + } + if( m_highlight.active && m_highlight.start != m_highlight.end ) { const auto s = std::min( m_highlight.start, m_highlight.end ); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index d42ca34e..42aa9ddc 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -474,6 +474,7 @@ private: bool m_sourceRegexValid = true; RangeSlim m_setRangePopup; + bool m_setRangePopupOpen = false; struct FindZone { enum : uint64_t { Unselected = std::numeric_limits::max() - 1 };