diff --git a/server/TracyView.hpp b/server/TracyView.hpp index b2ce445a..c16ba460 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -470,6 +470,7 @@ private: bool m_allocTimeRelativeToZone = true; bool m_ctxSwitchTimeRelativeToZone = true; bool m_messageTimeRelativeToZone = true; + bool m_messagesExcludeChildren = true; uint64_t m_zoneInfoMemPool = 0; int m_waitStack = 0; int m_waitStackMode = 0; diff --git a/server/TracyView_ZoneInfo.cpp b/server/TracyView_ZoneInfo.cpp index 45f4a8e4..21cefa2d 100644 --- a/server/TracyView_ZoneInfo.cpp +++ b/server/TracyView_ZoneInfo.cpp @@ -871,6 +871,8 @@ void View::DrawZoneInfoWindow() { ImGui::SameLine(); SmallCheckbox( "Time relative to zone start", &m_messageTimeRelativeToZone ); + ImGui::SameLine(); + SmallCheckbox( "Exclude children", &m_messagesExcludeChildren ); if( ImGui::BeginTable( "##messages", 2, ImGuiTableFlags_ScrollY | ImGuiTableFlags_BordersInnerV, ImVec2( 0, ImGui::GetTextLineHeightWithSpacing() * std::min( msgend-msgit+1, 15 ) ) ) ) { ImGui::TableSetupScrollFreeze( 0, 1 ); @@ -879,6 +881,11 @@ void View::DrawZoneInfoWindow() ImGui::TableHeadersRow(); do { + if( m_messagesExcludeChildren ) + { + auto msgzone = FindZoneAtTime( tid, (*msgit)->time ); + if( msgzone != &ev ) continue; + } ImGui::PushID( *msgit ); ImGui::TableNextRow(); ImGui::TableNextColumn();