From 92766430d9888782ad12a5831291cbe4004fae88 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 23 Jan 2019 14:25:28 +0100 Subject: [PATCH] Add "self time" checkbox to find zone menu. --- server/TracyView.cpp | 10 ++++++++++ server/TracyView.hpp | 2 ++ 2 files changed, 12 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index eb83b373..24c7e939 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4819,6 +4819,11 @@ void View::DrawFindZone() m_findZone.ResetMatch(); } } + if( m_findZone.scheduleResetMatch ) + { + m_findZone.scheduleResetMatch = false; + m_findZone.ResetMatch(); + } ImGui::Separator(); @@ -4907,6 +4912,11 @@ void View::DrawFindZone() ImGui::Text( "Show total time taken by calls in each bin instead of call counts." ); ImGui::EndTooltip(); } + ImGui::SameLine(); + if( ImGui::Checkbox( "Self time", &m_findZone.selfTime ) ) + { + m_findZone.scheduleResetMatch = true; + } ImGui::TextDisabled( "Time range:" ); ImGui::SameLine(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 89b8be3b..d0a2c089 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -309,6 +309,7 @@ private: bool logVal = false; bool logTime = true; bool cumulateTime = false; + bool selfTime = false; GroupBy groupBy = GroupBy::Thread; SortBy sortBy = SortBy::Count; Region highlight; @@ -322,6 +323,7 @@ private: int64_t total, selTotal; bool drawAvgMed = true; bool drawSelAvgMed = true; + bool scheduleResetMatch = false; void Reset() {