Collapse Tracy threads by default.

Note that this will likely work only when loading existing traces. In live
captures the thread name may not have yet been retrieved at the point when
timeline item insertion occurs, which will prevent the check from succeeding.
This commit is contained in:
Bartosz Taudul 2022-09-03 23:35:35 +02:00
parent ec3dcaeef3
commit ca125bd44c
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 8 additions and 2 deletions

View File

@ -39,12 +39,13 @@ protected:
virtual bool IsEmpty() const { return false; }
bool m_visible;
bool m_showFull;
private:
void AdjustThreadHeight( bool firstFrame, int oldOffset, int& offset );
float AdjustThreadPosition( float wy, int& offset );
bool m_visible;
bool m_showFull;
int m_height;
int m_offset;

View File

@ -16,6 +16,11 @@ TimelineItemThread::TimelineItemThread( View& view, Worker& worker, const Thread
, m_thread( thread )
, m_ghost( false )
{
auto name = worker.GetThreadName( thread->id );
if( strncmp( name, "Tracy ", 6 ) == 0 )
{
m_showFull = false;
}
}
bool TimelineItemThread::IsEmpty() const