diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d9383d86..e3075e54 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2916,18 +2916,6 @@ void View::DrawZones() const auto w = ImGui::GetWindowContentRegionWidth() - ImGui::GetStyle().ScrollbarSize; const auto timespan = m_vd.zvEnd - m_vd.zvStart; auto pxns = w / double( timespan ); - { - const auto tbegin = 0; - const auto tend = m_worker.GetLastTime(); - if( tbegin > m_vd.zvStart ) - { - draw->AddRectFilled( linepos, linepos + ImVec2( ( tbegin - m_vd.zvStart ) * pxns, lineh ), 0x44000000 ); - } - if( tend < m_vd.zvEnd ) - { - draw->AddRectFilled( linepos + ImVec2( ( tend - m_vd.zvStart ) * pxns, 0 ), linepos + ImVec2( w, lineh ), 0x44000000 ); - } - } const auto winpos = ImGui::GetWindowPos(); const auto winsize = ImGui::GetWindowSize(); @@ -2945,6 +2933,19 @@ void View::DrawZones() HandleZoneViewMouse( timespan, ImGui::GetCursorScreenPos(), w, pxns ); } + { + const auto tbegin = 0; + const auto tend = m_worker.GetLastTime(); + if( tbegin > m_vd.zvStart ) + { + draw->AddRectFilled( linepos, linepos + ImVec2( ( tbegin - m_vd.zvStart ) * pxns, lineh ), 0x44000000 ); + } + if( tend < m_vd.zvEnd ) + { + draw->AddRectFilled( linepos + ImVec2( ( tend - m_vd.zvStart ) * pxns, 0 ), linepos + ImVec2( w, lineh ), 0x44000000 ); + } + } + DrawZoneFramesHeader(); auto& frames = m_worker.GetFrames(); for( auto fd : frames )