mirror of https://github.com/KLayout/klayout.git
LEF/DEF reader recognizes existing layers by name now
This is helpful as it assigns layer/datatype numbers automatically. If only a name is given for a layer (i.e. "OUTLINE"), it will not match any previously loaded layer and layer matching goes by layer/datatype first. This way, every "reload" added a new "OUTLINE" layer.
This commit is contained in:
parent
7953cadab2
commit
4be134e293
|
|
@ -1508,7 +1508,9 @@ std::set<unsigned int> LEFDEFReaderState::open_layer_uncached(db::Layout &layout
|
|||
|
||||
bool found = false;
|
||||
for (db::Layout::layer_iterator i = layout.begin_layers (); i != layout.end_layers () && ! found; ++i) {
|
||||
if ((*i).second->log_equal (lp_new)) {
|
||||
// NOTE: if lp_new only has a name, we also check for the name. Since we assign a default layer/datatype,
|
||||
// otherwise, a "reload" in the UI would not recognize the layer as the same.
|
||||
if ((*i).second->log_equal (lp_new) || (lp_new.is_named () && (*i).second->name == lp_new.name)) {
|
||||
found = true;
|
||||
res.insert ((*i).first);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue