diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 8a712b75..737c1c94 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1926,11 +1926,7 @@ void View::DrawZones() if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( px - (ty - to) * 0.5 - 1, oldOffset ), wpos + ImVec2( px + (ty - to) * 0.5 + 1, oldOffset + ty ) ) ) { - ImGui::BeginTooltip(); - TextFocused( "Time:", TimeToString( crash.time - m_worker.GetTimeBegin() ) ); - TextFocused( "Reason:", m_worker.GetString( crash.message ) ); - ImGui::EndTooltip(); - + CrashTooltip(); if( ImGui::IsMouseClicked( 0 ) ) { m_showInfo = true; @@ -10543,6 +10539,15 @@ void View::CallstackTooltip( uint32_t idx ) ImGui::EndTooltip(); } +void View::CrashTooltip() +{ + auto& crash = m_worker.GetCrashEvent(); + ImGui::BeginTooltip(); + TextFocused( "Time:", TimeToString( crash.time - m_worker.GetTimeBegin() ) ); + TextFocused( "Reason:", m_worker.GetString( crash.message ) ); + ImGui::EndTooltip(); +} + const ZoneEvent* View::GetZoneParent( const ZoneEvent& zone ) const { for( const auto& thread : m_worker.GetThreadData() ) diff --git a/server/TracyView.hpp b/server/TracyView.hpp index ae57a973..49343d7f 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -168,6 +168,7 @@ private: void ZoneTooltip( const ZoneEvent& ev ); void ZoneTooltip( const GpuEvent& ev ); void CallstackTooltip( uint32_t idx ); + void CrashTooltip(); const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const; const GpuEvent* GetZoneParent( const GpuEvent& zone ) const;