| 268 | } |
| 269 | |
| 270 | void |
| 271 | LayoutViewBase::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 | |
| 312 | void |
| 313 | LayoutViewBase::init (db::Manager *mgr) |
nothing calls this directly
no test coverage detected