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

Method copy_from

src/laybasic/laybasic/layLayoutViewBase.cc:270–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270void
271LayoutViewBase::copy_from (lay::LayoutViewBase *source)
272{
273 m_annotation_shapes = source->m_annotation_shapes;
274
275 // set the handle reference and clear all cell related stuff
276 m_cellviews = source->cellview_list ();
277 m_hidden_cells = source->m_hidden_cells;
278
279 // clear the history, store path and zoom box
280 m_display_states.clear ();
281 m_display_state_ptr = 0;
282 m_synchronous = source->synchronous ();
283 m_drawing_workers = source->drawing_workers ();
284
285 begin_layer_updates ();
286
287 // duplicate the layer properties
288 for (size_t i = 0; i < source->m_layer_properties_lists.size (); ++i) {
289 if (i >= m_layer_properties_lists.size ()) {
290 m_layer_properties_lists.push_back (new lay::LayerPropertiesList (*source->m_layer_properties_lists [i]));
291 } else {
292 *m_layer_properties_lists [i] = *source->m_layer_properties_lists [i];
293 }
294 m_layer_properties_lists [i]->attach_view (this, (unsigned int) i);
295 }
296
297 end_layer_updates ();
298
299 if (! m_layer_properties_lists.empty ()) {
300 mp_canvas->set_dither_pattern (m_layer_properties_lists [0]->dither_pattern ());
301 mp_canvas->set_line_styles (m_layer_properties_lists [0]->line_styles ());
302 }
303
304 // copy the title
305 m_title = source->m_title;
306
307 layer_list_changed_event (3);
308
309 finish_cellviews_changed ();
310}
311
312void
313LayoutViewBase::init (db::Manager *mgr)

Callers

nothing calls this directly

Calls 8

dither_patternMethod · 0.80
clearMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
attach_viewMethod · 0.45
emptyMethod · 0.45
set_dither_patternMethod · 0.45
set_line_stylesMethod · 0.45

Tested by

no test coverage detected