From 4b97528604fe0b5d2cc041edcf02d21fccb51b7b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 6 Sep 2020 13:54:22 +0200 Subject: [PATCH] Streamline "waiting for connection" dialog. --- server/TracyView.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d007c8e9..f15f4e33 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -432,17 +432,15 @@ bool View::DrawImpl() { if( !m_worker.HasData() ) { + bool keepOpen = true; char tmp[2048]; sprintf( tmp, "%s###Connection", m_worker.GetAddr().c_str() ); - ImGui::Begin( tmp, nullptr, ImGuiWindowFlags_AlwaysAutoResize ); + ImGui::Begin( tmp, &keepOpen, ImGuiWindowFlags_AlwaysAutoResize ); TextCentered( ICON_FA_WIFI ); ImGui::TextUnformatted( "Waiting for connection..." ); DrawWaitingDots( s_time ); - ImGui::Spacing(); - ImGui::Separator(); - bool wasCancelled = ImGui::Button( "Cancel" ); ImGui::End(); - return !wasCancelled; + return keepOpen; } if( !m_uarchSet )