diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d4adbb1d..7000dae4 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1095,8 +1095,16 @@ bool View::DrawConnection() ImGui::EndPopup(); return false; } + ImGui::SameLine(); + if( ImGui::Button( "Reconnect" ) ) + { + ImGui::CloseCurrentPopup(); + ImGui::EndPopup(); + m_reconnectRequested = true; + return false; + } ImGui::SameLine( 0, ty * 2 ); - if( ImGui::Button( "No", ImVec2( ty * 8, 0 ) ) ) + if( ImGui::Button( "No", ImVec2( ty * 6, 0 ) ) ) { ImGui::CloseCurrentPopup(); } diff --git a/server/TracyView.hpp b/server/TracyView.hpp index ad68a744..3ad6da87 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -81,6 +81,7 @@ public: void NotifyRootWindowSize( float w, float h ) { m_rootWidth = w; m_rootHeight = h; } void SetTextEditorFile( const char* fileName, int line ); + bool ReconnectRequested() const { return m_reconnectRequested; } std::string GetAddress() const { return m_worker.GetAddr(); } int GetPort() const { return m_worker.GetPort(); } @@ -411,6 +412,8 @@ private: std::vector> m_annotations; UserData m_userData; + bool m_reconnectRequested = false; + struct FindZone { enum : uint64_t { Unselected = std::numeric_limits::max() - 1 }; enum class GroupBy : int { Thread, UserText, Callstack, Parent, NoGrouping };