| 5743 | } |
| 5744 | |
| 5745 | void |
| 5746 | LayoutViewBase::add_missing_layers () |
| 5747 | { |
| 5748 | std::set <lay::ParsedLayerSource> present; |
| 5749 | LayerPropertiesConstIterator l = begin_layers (); |
| 5750 | while (! l.at_end ()) { |
| 5751 | if (! l->has_children ()) { |
| 5752 | present.insert (l->source (true /*real*/)); |
| 5753 | } |
| 5754 | ++l; |
| 5755 | } |
| 5756 | |
| 5757 | std::vector <lay::ParsedLayerSource> actual; |
| 5758 | for (unsigned int cv = 0; cv < cellviews (); ++cv) { |
| 5759 | const db::Layout &layout = cellview (cv)->layout (); |
| 5760 | for (unsigned int l = 0; l < layout.layers (); ++l) { |
| 5761 | if (layout.is_valid_layer (l)) { |
| 5762 | actual.push_back (lay::ParsedLayerSource (layout.get_properties (l), cv)); |
| 5763 | } |
| 5764 | } |
| 5765 | } |
| 5766 | |
| 5767 | std::sort (actual.begin (), actual.end ()); |
| 5768 | |
| 5769 | for (std::vector <lay::ParsedLayerSource>::const_iterator a = actual.begin (); a != actual.end (); ++a) { |
| 5770 | if (present.find (*a) == present.end ()) { |
| 5771 | lay::LayerPropertiesNode node; |
| 5772 | node.attach_view (this, current_layer_list ()); |
| 5773 | node.set_source (*a); |
| 5774 | init_layer_properties (node); |
| 5775 | insert_layer (end_layers (), node); |
| 5776 | } |
| 5777 | } |
| 5778 | |
| 5779 | emit_layer_order_changed (); |
| 5780 | } |
| 5781 | |
| 5782 | LayerState |
| 5783 | LayoutViewBase::layer_snapshot () const |
no test coverage detected