From 2236ced5ae0ec0be098146044491c7c3b1daf2ac Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 27 Feb 2023 20:49:45 +0100 Subject: [PATCH] Refining solution for issue-1249: properly reading the edge we project to in single-edge partial move mode --- src/edt/edt/edtPartialService.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/edt/edt/edtPartialService.cc b/src/edt/edt/edtPartialService.cc index 95fbeb1a8..a527ea03c 100644 --- a/src/edt/edt/edtPartialService.cc +++ b/src/edt/edt/edtPartialService.cc @@ -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 (); }