Add source preview to call stack window.

This commit is contained in:
Bartosz Taudul 2021-03-27 13:42:42 +01:00
parent e2be45c0ba
commit 895a63b41a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -13449,7 +13449,7 @@ void View::DrawCallstackWindow()
assert( false ); assert( false );
break; break;
} }
if( ImGui::IsItemClicked( 1 ) ) if( ImGui::IsItemHovered() )
{ {
if( m_showCallstackFrameAddress == 3 ) if( m_showCallstackFrameAddress == 3 )
{ {
@ -13457,21 +13457,37 @@ void View::DrawCallstackWindow()
if( sym ) if( sym )
{ {
const auto symtxt = m_worker.GetString( sym->file ); const auto symtxt = m_worker.GetString( sym->file );
if( !ViewDispatch( symtxt, sym->line, frame.symAddr ) ) DrawSourceTooltip( symtxt, sym->line );
}
}
else
{
DrawSourceTooltip( txt, frame.line );
}
if( ImGui::IsItemClicked( 1 ) )
{
if( m_showCallstackFrameAddress == 3 )
{
const auto sym = m_worker.GetSymbolData( frame.symAddr );
if( sym )
{
const auto symtxt = m_worker.GetString( sym->file );
if( !ViewDispatch( symtxt, sym->line, frame.symAddr ) )
{
m_callstackBuzzAnim.Enable( bidx, 0.5f );
}
}
else
{ {
m_callstackBuzzAnim.Enable( bidx, 0.5f ); m_callstackBuzzAnim.Enable( bidx, 0.5f );
} }
} }
else else
{ {
m_callstackBuzzAnim.Enable( bidx, 0.5f ); if( !ViewDispatch( txt, frame.line, frame.symAddr ) )
} {
} m_callstackBuzzAnim.Enable( bidx, 0.5f );
else }
{
if( !ViewDispatch( txt, frame.line, frame.symAddr ) )
{
m_callstackBuzzAnim.Enable( bidx, 0.5f );
} }
} }
} }