From 429de331d684a4e10139ee9ec806a5c48d2a6882 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 28 Sep 2024 02:05:30 +0200 Subject: [PATCH] Show message in find zone window when no zones were collected. --- profiler/src/profiler/TracyView_FindZone.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/profiler/src/profiler/TracyView_FindZone.cpp b/profiler/src/profiler/TracyView_FindZone.cpp index 3e7a971e..560e9ae4 100644 --- a/profiler/src/profiler/TracyView_FindZone.cpp +++ b/profiler/src/profiler/TracyView_FindZone.cpp @@ -275,6 +275,16 @@ void View::DrawFindZone() ImGui::End(); return; } + if( m_worker.GetZoneCount() == 0 ) + { + ImGui::PushFont( m_bigFont ); + ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 2 ) * 0.5f ) ); + TextCentered( ICON_FA_CROW ); + TextCentered( "No zones were collected" ); + ImGui::PopFont(); + ImGui::End(); + return; + } bool findClicked = false;