Refining solution for issue-1249: properly reading the edge we project to in single-edge partial move mode

This commit is contained in:
Matthias Koefferlein 2023-02-27 20:49:45 +01:00
parent 3bef4917ad
commit 2236ced5ae
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 ();
}