Merge pull request #1306 from KLayout/issue-1249-2

Refining solution for issue-1249: properly reading the edge we projec…
This commit is contained in:
Matthias Köfferlein 2023-02-27 20:50:26 +01:00 committed by GitHub
commit 3788721b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -2426,6 +2426,14 @@ PartialService::single_selected_edge () const
db::ICplxTrans gt (cv.context_trans () * m_selection.begin ()->first.trans ());
db::CplxTrans tt = (*tv_list)[0] * db::CplxTrans (cv->layout ().dbu ()) * gt;
// pick the edge from the selection (there is: p1, p2 and the edge between them)
for (auto s = m_selection.begin ()->second.begin (); s != m_selection.begin ()->second.end (); ++s) {
if (s->n != s->nn) {
return tt * *s;
}
}
// fallback: should not happen
return tt * *m_selection.begin ()->second.begin ();
}