WIP: some debugging

This commit is contained in:
Matthias Koefferlein 2025-08-21 22:32:22 +02:00
parent 59432fb6ed
commit 3df715f078
1 changed files with 7 additions and 3 deletions

View File

@ -215,9 +215,13 @@ ShapeEditService::set_layer (const db::LayerProperties &lp, unsigned int cv_inde
try {
view ()->set_current_layer (cv_index, lp);
auto cl = view ()->current_layer ();
m_trans = (cl->trans ().front () * db::CplxTrans (cv->layout ().dbu ()) * cv.context_trans ()).inverted ();
auto cl = view ()->find_layer (cv_index, lp);
if (! cl.is_null ()) {
view ()->set_current_layer (cl);
m_trans = (cl->trans ().front () * db::CplxTrans (cv->layout ().dbu ()) * cv.context_trans ()).inverted ();
} else {
m_trans = (db::CplxTrans (cv->layout ().dbu ()) * cv.context_trans ()).inverted ();
}
m_update_edit_layer_enabled = true;