mirror of https://github.com/KLayout/klayout.git
DRC bugfix: layer wasn't overwritten but added on output.
This commit is contained in:
parent
dbe8c62177
commit
2e9fb9fe9a
|
|
@ -4867,37 +4867,31 @@ CODE
|
|||
# make sure the output has the right database unit
|
||||
output.dbu = self.dbu
|
||||
|
||||
if data.respond_to?(:is_deep?) && data.is_deep?
|
||||
tmp = li
|
||||
|
||||
begin
|
||||
|
||||
# mark the layer as used
|
||||
if !@used_output_layers[li]
|
||||
@output_layers.push(li)
|
||||
# Note: to avoid issues with output onto the input layer, we
|
||||
# output to a temp layer and later swap both. The simple implementation
|
||||
# did a clear here and the effect of that was that the data potentially
|
||||
# got invalidated.
|
||||
tmp = output.insert_layer(RBA::LayerInfo::new)
|
||||
@used_output_layers[li] = true
|
||||
end
|
||||
|
||||
# insert the data into the output layer
|
||||
if data.is_a?(RBA::EdgePairs)
|
||||
data.insert_into_as_polygons(output, output_cell.cell_index, li, 1)
|
||||
else
|
||||
data.insert_into(output, output_cell.cell_index, li)
|
||||
end
|
||||
if data.respond_to?(:is_deep?) && data.is_deep?
|
||||
|
||||
else
|
||||
|
||||
tmp = li
|
||||
|
||||
begin
|
||||
|
||||
if !@used_output_layers[li]
|
||||
@output_layers.push(li)
|
||||
# Note: to avoid issues with output onto the input layer, we
|
||||
# output to a temp layer and later swap both. The simple implementation
|
||||
# did a clear here and the effect of that was that the data potentially
|
||||
# got invalidated.
|
||||
tmp = output.insert_layer(RBA::LayerInfo::new)
|
||||
@used_output_layers[li] = true
|
||||
# insert the data into the output layer
|
||||
if data.is_a?(RBA::EdgePairs)
|
||||
data.insert_into_as_polygons(output, output_cell.cell_index, tmp, 1)
|
||||
else
|
||||
data.insert_into(output, output_cell.cell_index, tmp)
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
# insert the data into the output layer
|
||||
if data.is_a?(RBA::EdgePairs)
|
||||
output_cell.shapes(tmp).insert_as_polygons(data, 1)
|
||||
|
|
@ -4905,18 +4899,18 @@ CODE
|
|||
output_cell.shapes(tmp).insert(data)
|
||||
end
|
||||
|
||||
# make the temp layer the output layer
|
||||
if tmp != li
|
||||
output.swap_layers(tmp, li)
|
||||
end
|
||||
|
||||
ensure
|
||||
# clean up the original layer if requested
|
||||
if tmp != li
|
||||
output.delete_layer(tmp)
|
||||
end
|
||||
end
|
||||
|
||||
# make the temp layer the output layer
|
||||
if tmp != li
|
||||
output.swap_layers(tmp, li)
|
||||
end
|
||||
|
||||
ensure
|
||||
# clean up the original layer if requested
|
||||
if tmp != li
|
||||
output.delete_layer(tmp)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue