From cb4c1dac24ee12cf5f99a5ba7835d1ffdc45e72e Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 24 Mar 2018 14:45:01 +0100 Subject: [PATCH] Don't show pause/resume button if data is static. --- server/TracyView.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ffb2c6f2..499bd062 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -289,8 +289,11 @@ void View::DrawImpl() std::lock_guard lock( m_worker.GetDataLock() ); ImGui::Begin( m_worker.GetCaptureName().c_str(), nullptr, ImGuiWindowFlags_NoScrollbar ); - if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 70, 0 ) ) ) m_pause = !m_pause; - ImGui::SameLine(); + if( !m_worker.IsDataStatic() ) + { + if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 70, 0 ) ) ) m_pause = !m_pause; + ImGui::SameLine(); + } if( ImGui::Button( "Options", ImVec2( 70, 0 ) ) ) m_showOptions = true; ImGui::SameLine(); if( ImGui::Button( "Messages", ImVec2( 70, 0 ) ) ) m_showMessages = true;