Skip to content

Commit

Permalink
Merge pull request #1903 from KLayout/wip
Browse files Browse the repository at this point in the history
Wip
  • Loading branch information
klayoutmatthias authored Oct 20, 2024
2 parents 6c82177 + 8dab13e commit d5358c8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/drc/drc/built-in-macros/_drc_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3450,7 +3450,13 @@ def _make_target(arg, cellname = nil)
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
Expand Down
2 changes: 1 addition & 1 deletion src/lay/lay/layMacroEditorPage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ void MacroEditorPage::fill_completer_list ()
QString ssel = c.selectedText ();
QString s = ssel.mid (0, pos - pos0);

if (! s[0].isLetter () && s[0].toLatin1 () != '_') {
if (s.length () == 0 || (! s[0].isLetter () && s[0].toLatin1 () != '_')) {
return; // not a word
}

Expand Down
2 changes: 1 addition & 1 deletion src/laybasic/laybasic/gsiDeclLayLayoutViewBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ LAYBASIC_PUBLIC Class<lay::LayoutViewBase> decl_LayoutViewBase ("lay", "LayoutVi
gsi::method ("active_cellview", static_cast<lay::CellViewRef (lay::LayoutViewBase::*) ()> (&lay::LayoutViewBase::active_cellview_ref),
"@brief Gets the active cellview (shown in hierarchy browser)\n"
"\n"
"This is a convenience method which is equivalent to cellview(active_cellview_index()).\n"
"This is a convenience method which is equivalent to \"cellview(active_cellview_index)\".\n"
"\n"
"This method has been introduced in version 0.19.\n"
"Starting from version 0.25, the returned object can be manipulated which will have an immediate effect "
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/streamers/lefdef/db_plugin/dbLEFDEFImporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,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);
}
Expand Down

0 comments on commit d5358c8

Please sign in to comment.