mirror of https://github.com/KLayout/klayout.git
Refining solution for issue-1249: properly reading the edge we project to in single-edge partial move mode
This commit is contained in:
parent
3bef4917ad
commit
2236ced5ae
|
|
@ -2426,6 +2426,14 @@ PartialService::single_selected_edge () const
|
||||||
db::ICplxTrans gt (cv.context_trans () * m_selection.begin ()->first.trans ());
|
db::ICplxTrans gt (cv.context_trans () * m_selection.begin ()->first.trans ());
|
||||||
db::CplxTrans tt = (*tv_list)[0] * db::CplxTrans (cv->layout ().dbu ()) * gt;
|
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 ();
|
return tt * *m_selection.begin ()->second.begin ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue