From 24235406a0759101021ea68e9c7bf821fbfb4c3b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 18 Dec 2018 16:40:23 +0100 Subject: [PATCH] Enter key in find zone menu acts the same as pressing "find". --- server/TracyView.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index edb51c25..acad40d4 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4710,14 +4710,16 @@ void View::DrawFindZone() return; } + bool findClicked = false; + ImGui::PushItemWidth( -0.01f ); - ImGui::InputText( "", m_findZone.pattern, 1024 ); + findClicked |= ImGui::InputText( "", m_findZone.pattern, 1024, ImGuiInputTextFlags_EnterReturnsTrue ); ImGui::PopItemWidth(); #ifdef TRACY_EXTENDED_FONT - const bool findClicked = ImGui::Button( ICON_FA_SEARCH " Find" ); + findClicked |= ImGui::Button( ICON_FA_SEARCH " Find" ); #else - const bool findClicked = ImGui::Button( "Find" ); + findClicked |= ImGui::Button( "Find" ); #endif ImGui::SameLine();