Changeset - r26950:27884ba36eb0
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 15 months ago 2023-03-03 22:37:17
j.g.rennison@gmail.com
Fix #10522: Link graph line tooltip test for vertical lines (#10524)
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/linkgraph/linkgraph_gui.cpp
Show inline comments
 
@@ -373,8 +373,10 @@ bool LinkGraphOverlay::ShowTooltip(Point
 
				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;
0 comments (0 inline, 0 general)