mirror of https://github.com/KLayout/klayout.git
Properly handling editor hooks on edit layer change - also on via
This commit is contained in:
parent
ee89bc43c4
commit
d89aae6d97
|
|
@ -170,9 +170,17 @@ ShapeEditService::change_edit_layer (const db::LayerProperties &lp)
|
||||||
|
|
||||||
edt::set_or_request_current_layer (view (), lp, m_cv_index);
|
edt::set_or_request_current_layer (view (), lp, m_cv_index);
|
||||||
|
|
||||||
|
if (editing ()) {
|
||||||
|
close_editor_hooks (false);
|
||||||
|
}
|
||||||
|
|
||||||
// fetches the last configuration for the given layer
|
// fetches the last configuration for the given layer
|
||||||
view ()->set_active_cellview_index (m_cv_index);
|
view ()->set_active_cellview_index (m_cv_index);
|
||||||
config_recent_for_layer (lp, m_cv_index);
|
config_recent_for_layer (lp, m_cv_index);
|
||||||
|
|
||||||
|
if (editing ()) {
|
||||||
|
open_editor_hooks ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -267,10 +275,12 @@ ShapeEditService::update_edit_layer (const lay::LayerPropertiesConstIterator &cl
|
||||||
mp_layout = &(cv->layout ());
|
mp_layout = &(cv->layout ());
|
||||||
mp_cell = cv.cell ();
|
mp_cell = cv.cell ();
|
||||||
|
|
||||||
|
close_editor_hooks (false);
|
||||||
|
|
||||||
// fetches the last configuration for the given layer
|
// fetches the last configuration for the given layer
|
||||||
config_recent_for_layer (cv->layout ().get_properties ((unsigned int) layer), cv_index);
|
config_recent_for_layer (cv->layout ().get_properties ((unsigned int) layer), cv_index);
|
||||||
|
|
||||||
current_layer_changed ();
|
open_editor_hooks ();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,8 +74,6 @@ protected:
|
||||||
return m_editor_hooks;
|
return m_editor_hooks;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void current_layer_changed () { }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
db::VCplxTrans m_trans;
|
db::VCplxTrans m_trans;
|
||||||
unsigned int m_layer;
|
unsigned int m_layer;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue