diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 6bf6ed88..6620f223 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -13804,8 +13804,14 @@ void View::DrawCallstackWindow() bool show = true; ImGui::SetNextWindowSize( ImVec2( 1400, 500 ), ImGuiCond_FirstUseEver ); ImGui::Begin( "Call stack", &show, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse ); + DrawCallstackTable( m_callstackInfoWindow, true ); + ImGui::End(); + if( !show ) m_callstackInfoWindow = 0; +} - auto& cs = m_worker.GetCallstack( m_callstackInfoWindow ); +void View::DrawCallstackTable( uint32_t callstack, bool globalEntriesButton ) +{ + auto& cs = m_worker.GetCallstack( callstack ); if( ClipboardButton() ) { std::ostringstream s; @@ -13890,7 +13896,7 @@ void View::DrawCallstackWindow() ImGui::SameLine(); ImGui::RadioButton( "Symbol address", &m_showCallstackFrameAddress, 2 ); - if( m_worker.AreCallstackSamplesReady() ) + if( globalEntriesButton && m_worker.AreCallstackSamplesReady() ) { auto frame = m_worker.GetCallstackFrame( *cs.begin() ); if( frame && frame->data[0].symAddr != 0 ) @@ -14126,12 +14132,6 @@ void View::DrawCallstackWindow() } ImGui::EndTable(); } - ImGui::End(); - - if( !show ) - { - m_callstackInfoWindow = 0; - } } void View::DrawMemoryAllocWindow() diff --git a/server/TracyView.hpp b/server/TracyView.hpp index b14c1cdc..cb15a7d8 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -208,6 +208,7 @@ private: void DrawAllocList(); void DrawCompare(); void DrawCallstackWindow(); + void DrawCallstackTable( uint32_t callstack, bool globalEntriesButton ); void DrawMemoryAllocWindow(); void DrawInfo(); void DrawTextEditor();