mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
record startPos after drawing SmallColorBox
This commit is contained in:
parent
161d3946fa
commit
cddcc389f4
@ -3477,7 +3477,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
if( m_asmShowSourceLocation && !m_sourceFiles.empty() )
|
if( m_asmShowSourceLocation && !m_sourceFiles.empty() )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
const auto startPos = ImGui::GetCursorScreenPos();
|
ImVec2 startPos;
|
||||||
uint32_t srcline;
|
uint32_t srcline;
|
||||||
const auto srcidx = worker.GetLocationForAddress( line.addr, srcline );
|
const auto srcidx = worker.GetLocationForAddress( line.addr, srcline );
|
||||||
if( srcline != 0 )
|
if( srcline != 0 )
|
||||||
@ -3486,6 +3486,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
const auto fileColor = GetHsvColor( srcidx.Idx(), 0 );
|
const auto fileColor = GetHsvColor( srcidx.Idx(), 0 );
|
||||||
SmallColorBox( fileColor );
|
SmallColorBox( fileColor );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
startPos = ImGui::GetCursorScreenPos();
|
||||||
char buf[64];
|
char buf[64];
|
||||||
const auto fnsz = strlen( fileName );
|
const auto fnsz = strlen( fileName );
|
||||||
if( fnsz < 30 - m_maxLine )
|
if( fnsz < 30 - m_maxLine )
|
||||||
@ -3563,6 +3564,7 @@ void SourceView::RenderAsmLine( AsmLine& line, const AddrStat& ipcnt, const Addr
|
|||||||
{
|
{
|
||||||
SmallColorBox( 0 );
|
SmallColorBox( 0 );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
startPos = ImGui::GetCursorScreenPos();
|
||||||
TextDisabledUnformatted( "[unknown]" );
|
TextDisabledUnformatted( "[unknown]" );
|
||||||
}
|
}
|
||||||
ImGui::SameLine( 0, 0);
|
ImGui::SameLine( 0, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user