mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Don't draw unneeded separator.
This commit is contained in:
parent
5f0cab6b63
commit
49e3bc8b21
@ -10697,11 +10697,12 @@ void View::DrawMemoryAllocWindow()
|
||||
TextFocused( "Duration:", TimeToString( ev.TimeFree() - ev.TimeAlloc() ) );
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
bool sep = false;
|
||||
auto zoneAlloc = FindZoneAtTime( tidAlloc, ev.TimeAlloc() );
|
||||
if( zoneAlloc )
|
||||
{
|
||||
ImGui::Separator();
|
||||
sep = true;
|
||||
const auto& srcloc = m_worker.GetSourceLocation( zoneAlloc->SrcLoc() );
|
||||
const auto txt = srcloc.name.active ? m_worker.GetString( srcloc.name ) : m_worker.GetString( srcloc.function );
|
||||
ImGui::PushID( idx++ );
|
||||
@ -10728,6 +10729,7 @@ void View::DrawMemoryAllocWindow()
|
||||
auto zoneFree = FindZoneAtTime( tidFree, ev.TimeFree() );
|
||||
if( zoneFree )
|
||||
{
|
||||
if( !sep ) ImGui::Separator();
|
||||
const auto& srcloc = m_worker.GetSourceLocation( zoneFree->SrcLoc() );
|
||||
const auto txt = srcloc.name.active ? m_worker.GetString( srcloc.name ) : m_worker.GetString( srcloc.function );
|
||||
TextFocused( "Zone free:", txt );
|
||||
@ -10745,14 +10747,13 @@ void View::DrawMemoryAllocWindow()
|
||||
}
|
||||
ZoneTooltip( *zoneFree );
|
||||
}
|
||||
}
|
||||
|
||||
if( zoneAlloc != 0 && zoneAlloc == zoneFree )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
TextDisabledUnformatted( "(same zone)" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
if( !show ) m_memoryAllocInfoWindow = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user