Use the linked vector border when determining whether to display hover text, in the event of a slim line

This commit is contained in:
Dan Paulat 2024-02-17 00:09:30 -06:00
parent 3ca99ca023
commit b800efd45a

View file

@ -193,6 +193,7 @@ void LinkedVectors::FinishVectors()
GeoLines::SetLineModulate(borderLine, kBlack); GeoLines::SetLineModulate(borderLine, kBlack);
GeoLines::SetLineWidth(borderLine, di->width_ + 2.0f); GeoLines::SetLineWidth(borderLine, di->width_ + 2.0f);
GeoLines::SetLineVisible(borderLine, di->visible_); GeoLines::SetLineVisible(borderLine, di->visible_);
GeoLines::SetLineHoverText(borderLine, di->hoverText_);
di->borderDrawItems_.emplace_back(std::move(borderLine)); di->borderDrawItems_.emplace_back(std::move(borderLine));
} }
@ -217,7 +218,12 @@ void LinkedVectors::FinishVectors()
GeoLines::SetLineModulate(geoLine, di->modulate_); GeoLines::SetLineModulate(geoLine, di->modulate_);
GeoLines::SetLineWidth(geoLine, di->width_); GeoLines::SetLineWidth(geoLine, di->width_);
GeoLines::SetLineVisible(geoLine, di->visible_); 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)); di->lineDrawItems_.emplace_back(std::move(geoLine));
} }