MCPcopy Create free account
hub / github.com/KLayout/klayout / replace_layer_node

Method replace_layer_node

src/laybasic/laybasic/layLayoutViewBase.cc:2046–2078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2044}
2045
2046void
2047LayoutViewBase::replace_layer_node (unsigned int index, const LayerPropertiesConstIterator &iter, const LayerPropertiesNode &node)
2048{
2049 if (index >= layer_lists ()) {
2050 return;
2051 }
2052
2053 // if the source specification changed, a redraw is required
2054 if (*iter != node) {
2055
2056 if (transacting ()) {
2057 manager ()->queue (this, new OpSetLayerPropsNode (index, (unsigned int) iter.uint (), *iter, node));
2058 } else if (manager () && ! replaying ()) {
2059 manager ()->clear ();
2060 }
2061
2062 if (index == current_layer_list ()) {
2063 begin_layer_updates ();
2064 }
2065
2066 LayerPropertiesIterator non_const_iter (get_properties (index), iter.uint ());
2067 *non_const_iter = node;
2068 non_const_iter->attach_view (this, index);
2069
2070 if (index == current_layer_list ()) {
2071 end_layer_updates ();
2072 layer_list_changed_event (2);
2073 // TODO: check, if redraw is actually necessary (this is complex!)
2074 redraw_later ();
2075 m_prop_changed = true;
2076 }
2077 }
2078}
2079
2080void
2081LayoutViewBase::set_layer_node_expanded (unsigned int index, const LayerPropertiesConstIterator &iter, bool ex)

Callers 7

test_1Method · 0.80
test_1aMethod · 0.80
test_1Method · 0.80
test_1aMethod · 0.80
replace_layer_node2Function · 0.80
replace_layer_node1Function · 0.80
need_realizeMethod · 0.80

Calls 9

layer_listsFunction · 0.85
current_layer_listFunction · 0.85
transactingFunction · 0.70
managerFunction · 0.70
replayingFunction · 0.50
get_propertiesFunction · 0.50
queueMethod · 0.45
clearMethod · 0.45
attach_viewMethod · 0.45

Tested by 4

test_1Method · 0.64
test_1aMethod · 0.64
test_1Method · 0.64
test_1aMethod · 0.64