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

Method set_properties

src/laybasic/laybasic/layLayoutViewBase.cc:1960–2000  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1958}
1959
1960void
1961LayoutViewBase::set_properties (unsigned int index, const LayerPropertiesList &props)
1962{
1963 // If index is not a valid tab index, don't do anything except for the case of
1964 // index 0 in which the first entry is created (this can happen as a result of
1965 // delete_properties).
1966 if (index >= layer_lists ()) {
1967 if (index > 0) {
1968 return;
1969 } else {
1970 m_layer_properties_lists.push_back (new LayerPropertiesList ());
1971 m_layer_properties_lists.back ()->attach_view (this, (unsigned int) (m_layer_properties_lists.size () - 1));
1972 }
1973 }
1974
1975 // HINT: this method is quite frequently used in an imperative way.
1976 // Since it has some desired side effects such as forcing a recomputation of the internals,
1977 // it should be executed in any case, even if props == get_properties ().
1978
1979 if (transacting ()) {
1980 manager ()->queue (this, new OpSetAllProps (index, get_properties (), props));
1981 } else if (manager () && ! replaying ()) {
1982 manager ()->clear ();
1983 }
1984
1985 if (index == current_layer_list ()) {
1986 begin_layer_updates ();
1987 }
1988
1989 *m_layer_properties_lists [index] = props;
1990 m_layer_properties_lists [index]->attach_view (this, index);
1991
1992 merge_dither_pattern (*m_layer_properties_lists [index]);
1993
1994 if (index == current_layer_list ()) {
1995 end_layer_updates ();
1996 layer_list_changed_event (3);
1997 redraw_later ();
1998 m_prop_changed = true;
1999 }
2000}
2001
2002void
2003LayoutViewBase::clear_layers (unsigned int index)

Callers 1

need_realizeMethod · 0.45

Calls 14

layer_listsFunction · 0.85
current_layer_listFunction · 0.85
visibleMethod · 0.80
transactingFunction · 0.70
managerFunction · 0.70
get_propertiesFunction · 0.50
replayingFunction · 0.50
push_backMethod · 0.45
attach_viewMethod · 0.45
backMethod · 0.45
sizeMethod · 0.45
queueMethod · 0.45

Tested by

no test coverage detected