Switching between source files from asm view.

This commit is contained in:
Bartosz Taudul 2020-04-08 22:10:58 +02:00
parent 3f01d3bcb1
commit 0551cd8e44

View File

@ -864,12 +864,23 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip
ImGui::Text( "%s:%i", fileName, srcline ); ImGui::Text( "%s:%i", fileName, srcline );
ImGui::EndTooltip(); ImGui::EndTooltip();
if( m_font ) ImGui::PushFont( m_font ); if( m_font ) ImGui::PushFont( m_font );
if( !m_lines.empty() && m_file == fileName && ImGui::IsItemClicked() ) if( ImGui::IsItemClicked() )
{ {
m_currentAddr = line.addr; if( m_file == fileName )
m_targetLine = srcline; {
m_selectedLine = srcline; m_currentAddr = line.addr;
m_displayMode = DisplayMixed; m_targetLine = srcline;
m_selectedLine = srcline;
m_displayMode = DisplayMixed;
}
else if( SourceFileValid( fileName, worker.GetCaptureTime() ) )
{
ParseSource( fileName, &worker );
m_currentAddr = line.addr;
m_targetLine = srcline;
m_selectedLine = srcline;
m_displayMode = DisplayMixed;
}
} }
} }
ImGui::SameLine( 0, 0 ); ImGui::SameLine( 0, 0 );