mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +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 );
|
||||
}
|
||||
auto parent = GetZoneParent( ev );
|
||||
if( parent )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ImGui::Button( ICON_FA_ARROW_UP " Go to parent" ) )
|
||||
#else
|
||||
if( ImGui::Button( "Go to parent" ) )
|
||||
#endif
|
||||
{
|
||||
auto parent = GetZoneParent( ev );
|
||||
if( parent )
|
||||
{
|
||||
ShowZoneInfo( *parent );
|
||||
}
|
||||
@ -3693,7 +3693,6 @@ void View::DrawZoneInfoWindow()
|
||||
ImGui::Separator();
|
||||
|
||||
std::vector<const ZoneEvent*> zoneTrace;
|
||||
auto parent = GetZoneParent( ev );
|
||||
while( parent )
|
||||
{
|
||||
zoneTrace.emplace_back( parent );
|
||||
@ -3811,15 +3810,15 @@ void View::DrawGpuInfoWindow()
|
||||
{
|
||||
ZoomToZone( ev );
|
||||
}
|
||||
auto parent = GetZoneParent( ev );
|
||||
if( parent )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
#ifdef TRACY_EXTENDED_FONT
|
||||
if( ImGui::Button( ICON_FA_ARROW_UP " Go to parent" ) )
|
||||
#else
|
||||
if( ImGui::Button( "Go to parent" ) )
|
||||
#endif
|
||||
{
|
||||
auto parent = GetZoneParent( ev );
|
||||
if( parent )
|
||||
{
|
||||
ShowZoneInfo( *parent, m_gpuInfoWindowThread );
|
||||
}
|
||||
@ -3924,7 +3923,6 @@ void View::DrawGpuInfoWindow()
|
||||
ImGui::Separator();
|
||||
|
||||
std::vector<const GpuEvent*> zoneTrace;
|
||||
auto parent = GetZoneParent( ev );
|
||||
while( parent )
|
||||
{
|
||||
zoneTrace.emplace_back( parent );
|
||||
|
Loading…
Reference in New Issue
Block a user