mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08: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 );
|
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 ) )
|
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.ShowZone( v->first, name );
|
||||||
m_findZone.Reset();
|
|
||||||
m_findZone.match.emplace_back( v->first );
|
|
||||||
strcpy( m_findZone.pattern, name );
|
|
||||||
}
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Text( "%s:%i", m_worker.GetString( srcloc.file ), srcloc.line );
|
ImGui::Text( "%s:%i", m_worker.GetString( srcloc.file ), srcloc.line );
|
||||||
|
|||||||
@ -208,6 +208,14 @@ private:
|
|||||||
threads.clear();
|
threads.clear();
|
||||||
processed = 0;
|
processed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowZone( int32_t srcloc, const char* name )
|
||||||
|
{
|
||||||
|
show = true;
|
||||||
|
Reset();
|
||||||
|
match.emplace_back( srcloc );
|
||||||
|
strcpy( pattern, name );
|
||||||
|
}
|
||||||
} m_findZone;
|
} m_findZone;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user