From 403a556b30036d4db3e6fdd5a80ea50d46e83245 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 30 Aug 2025 22:42:56 -0500 Subject: [PATCH] Add tooltip to NO DATA AVAILABLE indication --- scwx-qt/source/scwx/qt/map/overlay_layer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp index 185562ad..951ad31a 100644 --- a/scwx-qt/source/scwx/qt/map/overlay_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/overlay_layer.cpp @@ -573,6 +573,20 @@ void OverlayLayer::Impl::RenderProductDetails( ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(255, 0, 0, 255)); ImGui::TextUnformatted("NO DATA AVAILABLE"); ImGui::PopStyleColor(); + if (ImGui::BeginItemTooltip()) + { + static constexpr float kFontSizeFactor_ = 20.0f; + static constexpr double kMaxWidthPercent_ = 0.8; + + ImGui::PushTextWrapPos( + std::min(ImGui::GetFontSize() * kFontSizeFactor_, + static_cast(params.width * kMaxWidthPercent_))); + ImGui::TextUnformatted( + "No data found for the selected product and time. Please select a " + "different product, or update your time selection."); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } ImGui::End(); }