Fix frame histogram when changing frame set in trace info window.

This commit is contained in:
Bartosz Taudul 2020-06-27 21:51:50 +02:00
parent 78028deec6
commit afbd6b8786

View File

@ -12669,7 +12669,7 @@ void View::DrawInfo()
if( ImGui::TreeNode( "Frame statistics" ) ) if( ImGui::TreeNode( "Frame statistics" ) )
{ {
const auto fsz = m_worker.GetFullFrameCount( *m_frames ); auto fsz = m_worker.GetFullFrameCount( *m_frames );
if( fsz != 0 ) if( fsz != 0 )
{ {
TextFocused( "Frame set:", m_frames->name == 0 ? "Frames" : m_worker.GetString( m_frames->name ) ); TextFocused( "Frame set:", m_frames->name == 0 ? "Frames" : m_worker.GetString( m_frames->name ) );
@ -12686,6 +12686,7 @@ void View::DrawInfo()
if( ImGui::Selectable( fd->name == 0 ? "Frames" : m_worker.GetString( fd->name ), isSelected ) ) if( ImGui::Selectable( fd->name == 0 ? "Frames" : m_worker.GetString( fd->name ), isSelected ) )
{ {
m_frames = fd; m_frames = fd;
fsz = m_worker.GetFullFrameCount( *m_frames );
} }
if( isSelected ) if( isSelected )
{ {