mirror of https://github.com/KLayout/klayout.git
Apply 'show all' one level deeper. This way it's possible to hide mismatching nets. But the net content is still shown in full detail.
This commit is contained in:
parent
e14a96a421
commit
4152f10bc4
|
|
@ -3112,7 +3112,7 @@ NetlistBrowserModel::rowCount (const QModelIndex &parent) const
|
|||
}
|
||||
|
||||
void
|
||||
NetlistBrowserModel::show_or_hide_items (QTreeView *view, const QModelIndex &parent, bool show_all, bool with_warnings, bool with_children)
|
||||
NetlistBrowserModel::show_or_hide_items (QTreeView *view, const QModelIndex &parent, bool show_all, bool with_warnings, int levels)
|
||||
{
|
||||
int n = rowCount (parent);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
|
|
@ -3123,8 +3123,8 @@ NetlistBrowserModel::show_or_hide_items (QTreeView *view, const QModelIndex &par
|
|||
bool visible = (show_all || (st != db::NetlistCrossReference::Match && (with_warnings || st != db::NetlistCrossReference::MatchWithWarning)));
|
||||
view->setRowHidden (int (i), parent, ! visible);
|
||||
|
||||
if (visible && with_children) {
|
||||
show_or_hide_items (view, idx, show_all, with_warnings, false /*just two levels of recursion*/);
|
||||
if (visible && levels > 1) {
|
||||
show_or_hide_items (view, idx, show_all, with_warnings, levels - 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3134,7 +3134,7 @@ void
|
|||
NetlistBrowserModel::set_item_visibility (QTreeView *view, bool show_all, bool with_warnings)
|
||||
{
|
||||
// TODO: this implementation is based on the model but is fairly inefficient
|
||||
show_or_hide_items (view, QModelIndex (), show_all, with_warnings, true);
|
||||
show_or_hide_items (view, QModelIndex (), show_all, with_warnings, 3);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ private:
|
|||
return std::pair<const db::Netlist *, const db::Netlist *> (mp_l2ndb->netlist (), (const db::Netlist *)0);
|
||||
}
|
||||
|
||||
void show_or_hide_items (QTreeView *view, const QModelIndex &parent, bool show_all, bool with_warnings, bool with_children);
|
||||
void show_or_hide_items (QTreeView *view, const QModelIndex &parent, bool show_all, bool with_warnings, int levels);
|
||||
|
||||
db::LayoutToNetlist *mp_l2ndb;
|
||||
db::LayoutVsSchematic *mp_lvsdb;
|
||||
|
|
|
|||
Loading…
Reference in New Issue