From 8dab13eb426ee16754a62c962001ffc8518f1740 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 6 Oct 2024 19:08:38 +0200 Subject: [PATCH] In DRC, with '@+' as target layout, maintain the original active cell view. This way, DRC can be re-run on the original layout, but each time generating a new output cellview. --- src/drc/drc/built-in-macros/_drc_engine.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/drc/drc/built-in-macros/_drc_engine.rb b/src/drc/drc/built-in-macros/_drc_engine.rb index faa119dac..fa5cf402c 100644 --- a/src/drc/drc/built-in-macros/_drc_engine.rb +++ b/src/drc/drc/built-in-macros/_drc_engine.rb @@ -3450,7 +3450,13 @@ CODE view = RBA::LayoutView::current view || raise("No view open") if $1 == "+" + prev_cv = view.active_cellview_index n = view.create_layout(true) + if prev_cv >= 0 + # make the original cellview the active one again - this way + # we can re-run DRC without using the new output. + view.active_cellview_index = prev_cv + end cellname ||= (@def_cell ? @def_cell.name : "TOP") else n = $1.to_i - 1