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,13 +864,24 @@ void SourceView::RenderAsmLine( const AsmLine& line, uint32_t ipcnt, uint32_t ip
ImGui::Text( "%s:%i", fileName, srcline );
ImGui::EndTooltip();
if( m_font ) ImGui::PushFont( m_font );
if( !m_lines.empty() && m_file == fileName && ImGui::IsItemClicked() )
if( ImGui::IsItemClicked() )
{
if( m_file == fileName )
{
m_currentAddr = line.addr;
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::ItemSize( ImVec2( stw * ( 32 - bufsz ), ty ), 0 );