| 1548 | } |
| 1549 | |
| 1550 | void |
| 1551 | LayoutViewBase::insert_layer_list (unsigned index, const LayerPropertiesList &props) |
| 1552 | { |
| 1553 | if (index > layer_lists ()) { |
| 1554 | return; |
| 1555 | } |
| 1556 | |
| 1557 | if (transacting ()) { |
| 1558 | manager ()->queue (this, new OpInsertLayerList (index, props)); |
| 1559 | } else if (manager () && ! replaying ()) { |
| 1560 | manager ()->clear (); |
| 1561 | } |
| 1562 | |
| 1563 | clear_layer_selection (); |
| 1564 | |
| 1565 | m_layer_properties_lists.insert (m_layer_properties_lists.begin () + index, new LayerPropertiesList (props)); |
| 1566 | m_layer_properties_lists [index]->attach_view (this, index); |
| 1567 | merge_dither_pattern (*m_layer_properties_lists [index]); |
| 1568 | |
| 1569 | m_current_layer_list = index; |
| 1570 | current_layer_list_changed_event (index); |
| 1571 | |
| 1572 | layer_list_inserted_event (index); |
| 1573 | |
| 1574 | redraw (); |
| 1575 | |
| 1576 | m_prop_changed = true; |
| 1577 | } |
| 1578 | |
| 1579 | void |
| 1580 | LayoutViewBase::delete_layer_list (unsigned index) |