Move find zone setup to a dedicated function.

This commit is contained in:
Bartosz Taudul 2018-04-05 19:30:32 +02:00
parent d1a0ae2564
commit 093787b3e8
2 changed files with 9 additions and 4 deletions

View File

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

View File

@ -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 {