From fc6cdc729bb576e58c765893f2bb2ef7042d6c8f Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Wed, 30 Aug 2023 22:55:37 -0500 Subject: [PATCH] If placefile lines overlap, hover text should come from the top line --- scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp b/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp index a2a8d38a..a24fc0a0 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp @@ -259,8 +259,8 @@ bool PlacefileLines::RunMousePicking( // For each pickable line auto it = std::find_if( std::execution::par_unseq, - p->currentHoverLines_.cbegin(), - p->currentHoverLines_.cend(), + p->currentHoverLines_.crbegin(), + p->currentHoverLines_.crend(), [&mapMatrix, &mousePos](const auto& line) { // Initialize vertices @@ -289,7 +289,7 @@ bool PlacefileLines::RunMousePicking( return util::maplibre::IsPointInPolygon({tl, bl, br, tr}, mousePos); }); - if (it != p->currentHoverLines_.cend()) + if (it != p->currentHoverLines_.crend()) { itemPicked = true; util::ImGui::Instance().DrawTooltip(it->di_->hoverText_);