| 1577 | } |
| 1578 | |
| 1579 | void |
| 1580 | LayoutViewBase::delete_layer_list (unsigned index) |
| 1581 | { |
| 1582 | if (index >= layer_lists ()) { |
| 1583 | return; |
| 1584 | } |
| 1585 | |
| 1586 | if (transacting ()) { |
| 1587 | manager ()->queue (this, new OpDeleteLayerList (index, *m_layer_properties_lists [index])); |
| 1588 | } else if (manager () && ! replaying ()) { |
| 1589 | manager ()->clear (); |
| 1590 | } |
| 1591 | |
| 1592 | clear_layer_selection (); |
| 1593 | |
| 1594 | delete m_layer_properties_lists [index]; |
| 1595 | m_layer_properties_lists.erase (m_layer_properties_lists.begin () + index); |
| 1596 | |
| 1597 | if (m_current_layer_list > index) { |
| 1598 | |
| 1599 | --m_current_layer_list; |
| 1600 | current_layer_list_changed_event (m_current_layer_list); |
| 1601 | |
| 1602 | // don't tell the other observers because effectively nothing has changed. |
| 1603 | |
| 1604 | } else if (m_current_layer_list == index) { |
| 1605 | |
| 1606 | if (m_current_layer_list > 0) { |
| 1607 | --m_current_layer_list; |
| 1608 | } |
| 1609 | |
| 1610 | current_layer_list_changed_event (m_current_layer_list); |
| 1611 | |
| 1612 | // the current list has been deleted. |
| 1613 | layer_list_changed_event (3); |
| 1614 | |
| 1615 | redraw (); |
| 1616 | |
| 1617 | } |
| 1618 | |
| 1619 | layer_list_deleted_event (index); |
| 1620 | m_prop_changed = true; |
| 1621 | } |
| 1622 | |
| 1623 | void |
| 1624 | LayoutViewBase::rename_properties (unsigned int index, const std::string &new_name) |
no test coverage detected