1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use common functionality to get frame set name.

This commit is contained in:
Bartosz Taudul
2022-07-30 19:32:25 +02:00
parent 92871ba75a
commit b19f9e1f4d
8 changed files with 39 additions and 14 deletions
+2 -2
View File
@@ -188,7 +188,7 @@ void View::DrawInfo()
auto fsz = m_worker.GetFullFrameCount( *m_frames );
if( fsz != 0 )
{
TextFocused( "Frame set:", m_frames->name == 0 ? "Frames" : m_worker.GetString( m_frames->name ) );
TextFocused( "Frame set:", GetFrameSetName( *m_frames ) );
ImGui::SameLine();
ImGui::TextDisabled( "(%s)", m_frames->continuous ? "continuous" : "discontinuous" );
ImGui::SameLine();
@@ -199,7 +199,7 @@ void View::DrawInfo()
for( auto& fd : frames )
{
bool isSelected = m_frames == fd;
if( ImGui::Selectable( fd->name == 0 ? "Frames" : m_worker.GetString( fd->name ), isSelected ) )
if( ImGui::Selectable( GetFrameSetName( *fd ), isSelected ) )
{
m_frames = fd;
fsz = m_worker.GetFullFrameCount( *m_frames );