Fix #10522: Link graph line tooltip test for vertical lines (#10524)

pull/491/head
Jonathan G Rennison 1 year ago committed by GitHub
parent 3719f60de0
commit 87f4d37de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -373,8 +373,10 @@ bool LinkGraphOverlay::ShowTooltip(Point pt, TooltipCloseCondition close_cond)
std::sqrt((ptb.x - pta.x) * (ptb.x - pta.x) + (ptb.y - pta.y) * (ptb.y - pta.y));
const auto &link = j->second;
if (dist <= 4 && link.Usage() > 0 &&
pt.x >= std::min(pta.x, ptb.x) &&
pt.x <= std::max(pta.x, ptb.x)) {
pt.x + 2 >= std::min(pta.x, ptb.x) &&
pt.x - 2 <= std::max(pta.x, ptb.x) &&
pt.y + 2 >= std::min(pta.y, ptb.y) &&
pt.y - 2 <= std::max(pta.y, ptb.y)) {
static char buf[1024];
char *buf_end = buf;
buf[0] = 0;

Loading…
Cancel
Save