mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Move find zone setup to a dedicated function.
This commit is contained in:
parent
d1a0ae2564
commit
093787b3e8
@ -3636,10 +3636,7 @@ void View::DrawStatistics()
|
||||
auto name = m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function );
|
||||
if( ImGui::Selectable( name, m_findZone.show && !m_findZone.match.empty() && m_findZone.match[m_findZone.selMatch] == v->first, ImGuiSelectableFlags_SpanAllColumns ) )
|
||||
{
|
||||
m_findZone.show = true;
|
||||
m_findZone.Reset();
|
||||
m_findZone.match.emplace_back( v->first );
|
||||
strcpy( m_findZone.pattern, name );
|
||||
m_findZone.ShowZone( v->first, name );
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
ImGui::Text( "%s:%i", m_worker.GetString( srcloc.file ), srcloc.line );
|
||||
|
@ -208,6 +208,14 @@ private:
|
||||
threads.clear();
|
||||
processed = 0;
|
||||
}
|
||||
|
||||
void ShowZone( int32_t srcloc, const char* name )
|
||||
{
|
||||
show = true;
|
||||
Reset();
|
||||
match.emplace_back( srcloc );
|
||||
strcpy( pattern, name );
|
||||
}
|
||||
} m_findZone;
|
||||
|
||||
struct {
|
||||
|
Loading…
Reference in New Issue
Block a user