From b800efd45ad180f8be69e738e2494d0dcdb45a43 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 17 Feb 2024 00:09:30 -0600 Subject: [PATCH] Use the linked vector border when determining whether to display hover text, in the event of a slim line --- scwx-qt/source/scwx/qt/gl/draw/linked_vectors.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scwx-qt/source/scwx/qt/gl/draw/linked_vectors.cpp b/scwx-qt/source/scwx/qt/gl/draw/linked_vectors.cpp index 00bcd3e3..fad46a2a 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/linked_vectors.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/linked_vectors.cpp @@ -193,6 +193,7 @@ void LinkedVectors::FinishVectors() GeoLines::SetLineModulate(borderLine, kBlack); GeoLines::SetLineWidth(borderLine, di->width_ + 2.0f); GeoLines::SetLineVisible(borderLine, di->visible_); + GeoLines::SetLineHoverText(borderLine, di->hoverText_); di->borderDrawItems_.emplace_back(std::move(borderLine)); } @@ -217,7 +218,12 @@ void LinkedVectors::FinishVectors() GeoLines::SetLineModulate(geoLine, di->modulate_); GeoLines::SetLineWidth(geoLine, di->width_); GeoLines::SetLineVisible(geoLine, di->visible_); - GeoLines::SetLineHoverText(geoLine, di->hoverText_); + + // If the border is not enabled, this line must have hover text instead + if (!p->borderEnabled_) + { + GeoLines::SetLineHoverText(geoLine, di->hoverText_); + } di->lineDrawItems_.emplace_back(std::move(geoLine)); }