mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +00:00
Hide frame related information if no frame instrumentation.
This commit is contained in:
parent
23ebce2862
commit
5200ea2c84
@ -836,6 +836,8 @@ bool View::DrawImpl()
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
}
|
||||
if( m_worker.AreFramesUsed() )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
if( ImGui::SmallButton( " " ICON_FA_CARET_LEFT " " ) ) ZoomToPrevFrame();
|
||||
ImGui::SameLine();
|
||||
@ -886,6 +888,7 @@ bool View::DrawImpl()
|
||||
if( clicked ) ZoomToRange( m_worker.GetFrameBegin( *m_frames, frameNum - frameOffset ), m_worker.GetFrameEnd( *m_frames, frameNum - frameOffset ) );
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
ImGui::SameLine();
|
||||
|
@ -696,6 +696,8 @@ void View::DrawOptions()
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if( m_worker.AreFramesUsed() )
|
||||
{
|
||||
ImGui::Separator();
|
||||
expand = ImGui::TreeNode( ICON_FA_IMAGES " Visible frame sets:" );
|
||||
ImGui::SameLine();
|
||||
@ -730,6 +732,7 @@ void View::DrawOptions()
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
|
@ -296,6 +296,8 @@ void View::DrawTimeline()
|
||||
|
||||
m_tc.Begin();
|
||||
DrawTimelineFramesHeader();
|
||||
if( m_worker.AreFramesUsed() )
|
||||
{
|
||||
auto& frames = m_worker.GetFrames();
|
||||
for( auto fd : frames )
|
||||
{
|
||||
@ -304,6 +306,7 @@ void View::DrawTimeline()
|
||||
DrawTimelineFrames( *fd );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const auto yMin = ImGui::GetCursorScreenPos().y;
|
||||
const auto yMax = linepos.y + lineh;
|
||||
|
@ -183,7 +183,7 @@ void View::DrawInfo()
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if( ImGui::TreeNode( "Frame statistics" ) )
|
||||
if( m_worker.AreFramesUsed() && ImGui::TreeNode( "Frame statistics" ) )
|
||||
{
|
||||
auto fsz = m_worker.GetFullFrameCount( *m_frames );
|
||||
if( fsz != 0 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user