From 045f792e84f07e8706569ef2ff4f9a84a7f4d6dc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 10 Jul 2018 20:47:09 +0200 Subject: [PATCH] Keep one profiler window size for all captures. --- NEWS | 2 ++ server/TracyView.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 91117cfa..efc6eb96 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ v0.4 (xxxx-xx-xx) - Added trace update utility, which will convert files saved in previous versions of tracy to be up-to-date. +- Fix regression causing varying size of profiler window for different + captures. v0.3.3 (2018-07-03) ------------------- diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 840a1638..b6b2bba7 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -333,7 +333,9 @@ bool View::DrawImpl() { if( !m_worker.HasData() ) { - ImGui::Begin( m_worker.GetAddr().c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize ); + char tmp[2048]; + sprintf( tmp, "%s###Connection", m_worker.GetAddr().c_str() ); + ImGui::Begin( tmp, nullptr, ImGuiWindowFlags_AlwaysAutoResize ); ImGui::Text( "Waiting for connection..." ); ImGui::End(); return true; @@ -359,7 +361,9 @@ bool View::DrawImpl() } std::lock_guard lock( m_worker.GetDataLock() ); - ImGui::Begin( m_worker.GetCaptureName().c_str(), keepOpenPtr, ImVec2( 1550, 800 ), -1, ImGuiWindowFlags_NoScrollbar ); + char tmp[2048]; + sprintf( tmp, "%s###Profiler", m_worker.GetCaptureName().c_str() ); + ImGui::Begin( tmp, keepOpenPtr, ImVec2( 1550, 800 ), -1, ImGuiWindowFlags_NoScrollbar ); if( !m_worker.IsDataStatic() ) { if( ImGui::Button( m_pause ? MainWindowButtons[0] : MainWindowButtons[1], ImVec2( bw, 0 ) ) ) m_pause = !m_pause;