Prevent opening obsolete source files.

This commit is contained in:
Bartosz Taudul 2020-04-08 23:07:59 +02:00
parent 3e2260bdcb
commit 3a1f980a36

View File

@ -581,6 +581,8 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
SmallColorBox( color ); SmallColorBox( color );
ImGui::SameLine(); ImGui::SameLine();
auto fstr = worker.GetString( StringIdx( v.first ) ); auto fstr = worker.GetString( StringIdx( v.first ) );
if( SourceFileValid( fstr, worker.GetCaptureTime() ) )
{
ImGui::PushID( v.first ); ImGui::PushID( v.first );
if( ImGui::Selectable( fstr, fstr == m_file ) ) if( ImGui::Selectable( fstr, fstr == m_file ) )
{ {
@ -588,6 +590,11 @@ void SourceView::RenderSymbolSourceView( uint32_t iptotal, unordered_flat_map<ui
m_targetLine = v.second; m_targetLine = v.second;
SelectLine( v.second, &worker ); SelectLine( v.second, &worker );
} }
}
else
{
TextDisabledUnformatted( fstr );
}
ImGui::PopID(); ImGui::PopID();
} }
ImGui::EndCombo(); ImGui::EndCombo();