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

Method redo

src/laybasic/laybasic/layLayoutViewBase.cc:2211–2294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2209}
2210
2211void
2212LayoutViewBase::redo (db::Op *op)
2213{
2214 tl_assert (! transacting ());
2215
2216 OpSetLayerProps *sop = dynamic_cast <OpSetLayerProps *> (op);
2217 if (sop) {
2218 if (sop->m_list_index < m_layer_properties_lists.size ()) {
2219 set_properties (sop->m_list_index, lay::LayerPropertiesConstIterator (*m_layer_properties_lists [sop->m_list_index], sop->m_index), sop->m_new);
2220 }
2221 return;
2222 }
2223
2224 OpSetLayerPropsNode *snop = dynamic_cast <OpSetLayerPropsNode *> (op);
2225 if (snop) {
2226 if (snop->m_list_index < m_layer_properties_lists.size ()) {
2227 replace_layer_node (snop->m_list_index, lay::LayerPropertiesConstIterator (*m_layer_properties_lists [snop->m_list_index], snop->m_index), snop->m_new);
2228 }
2229 return;
2230 }
2231
2232 OpInsertLayerList *ilop = dynamic_cast <OpInsertLayerList *> (op);
2233 if (ilop) {
2234 if (ilop->m_list_index <= m_layer_properties_lists.size ()) {
2235 insert_layer_list (ilop->m_list_index, ilop->m_new);
2236 }
2237 return;
2238 }
2239
2240 OpDeleteLayerList *dlop = dynamic_cast <OpDeleteLayerList *> (op);
2241 if (dlop) {
2242 if (dlop->m_list_index < m_layer_properties_lists.size ()) {
2243 delete_layer_list (dlop->m_list_index);
2244 }
2245 return;
2246 }
2247
2248 OpSetAllProps *saop = dynamic_cast <OpSetAllProps *> (op);
2249 if (saop) {
2250 if (saop->m_list_index < m_layer_properties_lists.size ()) {
2251 set_properties (saop->m_list_index, saop->m_new);
2252 }
2253 return;
2254 }
2255
2256 OpRenameProps *rnop = dynamic_cast <OpRenameProps *> (op);
2257 if (rnop) {
2258 if (rnop->m_list_index < m_layer_properties_lists.size ()) {
2259 rename_properties (rnop->m_list_index, rnop->m_new);
2260 }
2261 return;
2262 }
2263
2264 OpLayerList *lop = dynamic_cast <OpLayerList *> (op);
2265 if (lop) {
2266 if (lop->m_list_index < m_layer_properties_lists.size ()) {
2267 if (lop->m_mode == OpLayerList::Insert) {
2268 insert_layer (lop->m_list_index, lay::LayerPropertiesConstIterator (*m_layer_properties_lists [lop->m_list_index], lop->m_index), lop->m_node);

Callers

nothing calls this directly

Calls 9

replace_layer_nodeFunction · 0.85
insert_layer_listFunction · 0.85
delete_layerFunction · 0.85
set_dither_patternFunction · 0.85
transactingFunction · 0.70
set_propertiesFunction · 0.70
redoFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected