From 851ae9077b0b5df2cfab0f90a87f1d75b145b4d5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 27 Feb 2019 02:27:05 +0100 Subject: [PATCH] Make small callstack button tooltip optional. --- server/TracyView.cpp | 4 ++-- server/TracyView.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 173f691f..44ed041b 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -9565,7 +9565,7 @@ void View::FindZonesCompare() } #endif -void View::SmallCallstackButton( const char* name, uint32_t callstack, int& idx ) +void View::SmallCallstackButton( const char* name, uint32_t callstack, int& idx, bool tooltip ) { bool hilite = m_callstackInfoWindow == callstack; if( hilite ) @@ -9582,7 +9582,7 @@ void View::SmallCallstackButton( const char* name, uint32_t callstack, int& idx { ImGui::PopStyleColor( 3 ); } - if( ImGui::IsItemHovered() ) + if( tooltip && ImGui::IsItemHovered() ) { CallstackTooltip( callstack ); } diff --git a/server/TracyView.hpp b/server/TracyView.hpp index e6caefcd..b446c39b 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -175,7 +175,7 @@ private: std::pair GetMemoryPages() const; const char* GetPlotName( const PlotData* plot ) const; - void SmallCallstackButton( const char* name, uint32_t callstack, int& idx ); + void SmallCallstackButton( const char* name, uint32_t callstack, int& idx, bool tooltip = true ); void SetViewToLastFrames(); int64_t GetZoneChildTime( const ZoneEvent& zone ); int64_t GetZoneChildTime( const GpuEvent& zone );