mirror of https://github.com/KLayout/klayout.git
More precise testing of edges on mouse hit - without this patch, the selected objects in dense regions are not at the mouse pointer's tip, but somewhat away
This commit is contained in:
parent
1422dfb93d
commit
424c039b7e
|
|
@ -137,8 +137,11 @@ Finder::test_edge (const db::ICplxTrans &trans, const db::Edge &edg, double &dis
|
|||
double d1 = p1.double_distance (m_region.center ());
|
||||
double d2 = p2.double_distance (m_region.center ());
|
||||
|
||||
// snap to the point - nothing can get closer
|
||||
distance = 0.0;
|
||||
double d = std::min (d1, d2);
|
||||
if (! match || d < distance) {
|
||||
distance = d;
|
||||
}
|
||||
|
||||
if (d1 < d2) {
|
||||
ret = 1;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue