From ce8e42f00bff49d2e4d99c4b2ac51f81d5b7af3e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 13 Nov 2021 01:08:36 +0100 Subject: [PATCH] Separate drawing callstack tooltip from drawing its contents. --- server/TracyView.cpp | 10 +++++++--- server/TracyView.hpp | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7d1161df..830786d4 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -17776,9 +17776,14 @@ void View::ZoneTooltip( const GpuEvent& ev ) void View::CallstackTooltip( uint32_t idx ) { - auto& cs = m_worker.GetCallstack( idx ); - ImGui::BeginTooltip(); + CallstackTooltipContents( idx ); + ImGui::EndTooltip(); +} + +void View::CallstackTooltipContents( uint32_t idx ) +{ + auto& cs = m_worker.GetCallstack( idx ); int fidx = 0; for( auto& entry : cs ) { @@ -17836,7 +17841,6 @@ void View::CallstackTooltip( uint32_t idx ) } } } - ImGui::EndTooltip(); } void View::CrashTooltip() diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 417a710d..037bfbd5 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -262,6 +262,7 @@ private: void ZoneTooltip( const ZoneEvent& ev ); void ZoneTooltip( const GpuEvent& ev ); void CallstackTooltip( uint32_t idx ); + void CallstackTooltipContents( uint32_t idx ); void CrashTooltip(); const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const;