Separate callstack table drawing functionality.

This commit is contained in:
Bartosz Taudul 2021-11-13 15:56:57 +01:00
parent c1f6d6c9ce
commit 45df37e3a9
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 9 additions and 8 deletions

View File

@ -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()

View File

@ -208,6 +208,7 @@ private:
void DrawAllocList();
void DrawCompare();
void DrawCallstackWindow();
void DrawCallstackTable( uint32_t callstack, bool globalEntriesButton );
void DrawMemoryAllocWindow();
void DrawInfo();
void DrawTextEditor();