mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 09:14:36 +00:00
Don't display threads with no messages.
This commit is contained in:
parent
48b5b25a6a
commit
ae53c8e6f0
@ -5291,13 +5291,16 @@ void View::DrawMessages()
|
|||||||
{
|
{
|
||||||
ImGui::Begin( "Messages", &m_showMessages );
|
ImGui::Begin( "Messages", &m_showMessages );
|
||||||
|
|
||||||
|
size_t tsz = 0;
|
||||||
|
for( const auto& t : m_worker.GetThreadData() ) if( !t->messages.empty() ) tsz++;
|
||||||
|
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
auto expand = ImGui::TreeNode( ICON_FA_RANDOM " Visible threads:" );
|
auto expand = ImGui::TreeNode( ICON_FA_RANDOM " Visible threads:" );
|
||||||
#else
|
#else
|
||||||
auto expand = ImGui::TreeNode( "Visible threads:" );
|
auto expand = ImGui::TreeNode( "Visible threads:" );
|
||||||
#endif
|
#endif
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%zu)", m_worker.GetThreadData().size() );
|
ImGui::TextDisabled( "(%zu)", tsz );
|
||||||
if( expand )
|
if( expand )
|
||||||
{
|
{
|
||||||
auto& crash = m_worker.GetCrashEvent();
|
auto& crash = m_worker.GetCrashEvent();
|
||||||
@ -5321,6 +5324,7 @@ void View::DrawMessages()
|
|||||||
int idx = 0;
|
int idx = 0;
|
||||||
for( const auto& t : m_worker.GetThreadData() )
|
for( const auto& t : m_worker.GetThreadData() )
|
||||||
{
|
{
|
||||||
|
if( t->messages.empty() ) continue;
|
||||||
ImGui::PushID( idx++ );
|
ImGui::PushID( idx++ );
|
||||||
ImGui::Checkbox( m_worker.GetThreadString( t->id ), &VisibleMsgThread( t->id ) );
|
ImGui::Checkbox( m_worker.GetThreadString( t->id ), &VisibleMsgThread( t->id ) );
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
|
Loading…
Reference in New Issue
Block a user