mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Only display "go to parent" if there is a parent.
This commit is contained in:
parent
91c397f25c
commit
0757930521
@ -3461,15 +3461,15 @@ void View::DrawZoneInfoWindow()
|
|||||||
{
|
{
|
||||||
ZoomToZone( ev );
|
ZoomToZone( ev );
|
||||||
}
|
}
|
||||||
|
auto parent = GetZoneParent( ev );
|
||||||
|
if( parent )
|
||||||
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
if( ImGui::Button( ICON_FA_ARROW_UP " Go to parent" ) )
|
if( ImGui::Button( ICON_FA_ARROW_UP " Go to parent" ) )
|
||||||
#else
|
#else
|
||||||
if( ImGui::Button( "Go to parent" ) )
|
if( ImGui::Button( "Go to parent" ) )
|
||||||
#endif
|
#endif
|
||||||
{
|
|
||||||
auto parent = GetZoneParent( ev );
|
|
||||||
if( parent )
|
|
||||||
{
|
{
|
||||||
ShowZoneInfo( *parent );
|
ShowZoneInfo( *parent );
|
||||||
}
|
}
|
||||||
@ -3693,7 +3693,6 @@ void View::DrawZoneInfoWindow()
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
std::vector<const ZoneEvent*> zoneTrace;
|
std::vector<const ZoneEvent*> zoneTrace;
|
||||||
auto parent = GetZoneParent( ev );
|
|
||||||
while( parent )
|
while( parent )
|
||||||
{
|
{
|
||||||
zoneTrace.emplace_back( parent );
|
zoneTrace.emplace_back( parent );
|
||||||
@ -3811,15 +3810,15 @@ void View::DrawGpuInfoWindow()
|
|||||||
{
|
{
|
||||||
ZoomToZone( ev );
|
ZoomToZone( ev );
|
||||||
}
|
}
|
||||||
|
auto parent = GetZoneParent( ev );
|
||||||
|
if( parent )
|
||||||
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
if( ImGui::Button( ICON_FA_ARROW_UP " Go to parent" ) )
|
if( ImGui::Button( ICON_FA_ARROW_UP " Go to parent" ) )
|
||||||
#else
|
#else
|
||||||
if( ImGui::Button( "Go to parent" ) )
|
if( ImGui::Button( "Go to parent" ) )
|
||||||
#endif
|
#endif
|
||||||
{
|
|
||||||
auto parent = GetZoneParent( ev );
|
|
||||||
if( parent )
|
|
||||||
{
|
{
|
||||||
ShowZoneInfo( *parent, m_gpuInfoWindowThread );
|
ShowZoneInfo( *parent, m_gpuInfoWindowThread );
|
||||||
}
|
}
|
||||||
@ -3924,7 +3923,6 @@ void View::DrawGpuInfoWindow()
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
std::vector<const GpuEvent*> zoneTrace;
|
std::vector<const GpuEvent*> zoneTrace;
|
||||||
auto parent = GetZoneParent( ev );
|
|
||||||
while( parent )
|
while( parent )
|
||||||
{
|
{
|
||||||
zoneTrace.emplace_back( parent );
|
zoneTrace.emplace_back( parent );
|
||||||
|
Loading…
Reference in New Issue
Block a user