diff --git a/src/layui/layui/NetlistBrowserPage.ui b/src/layui/layui/NetlistBrowserPage.ui
index ca6fba4bd..684f347ed 100644
--- a/src/layui/layui/NetlistBrowserPage.ui
+++ b/src/layui/layui/NetlistBrowserPage.ui
@@ -30,591 +30,586 @@
0
-
-
-
- Qt::Horizontal
+
+
+
+ 1
+ 0
+
-
-
-
- 1
- 0
-
+
+ QFrame::NoFrame
+
+
+ QFrame::Raised
+
+
+
+ 5
-
- QFrame::NoFrame
+
+ 0
-
- QFrame::Raised
+
+ 0
-
-
- 5
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- QFrame::NoFrame
+
+ 0
+
+
+ 0
+
+
-
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Raised
+
+
+
+ 2
-
- QFrame::Raised
+
+ 0
-
-
- 2
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ ...
+
+
+
+ :/back_16.png:/back_16.png
+
+
+ true
+
+
+
+ -
+
+
+ ...
+
+
+
+ :/forward_16.png:/forward_16.png
+
+
+ true
+
+
+
+ -
+
+
+ Show more information about nets
+
+
+ ...
+
+
+
+ :/info_16.png:/info_16.png
+
+
+ true
+
+
+
+ -
+
+
+ ...
+
+
+
+ :/run.png:/run.png
+
+
+ F5
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 1
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 250
+ 16777215
+
+
+
+
+ -
+
+
+ Find in netlist
+
+
+ ...
+
+
+
+ :/find.png:/find.png
+
+
+ true
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 6
+ 20
+
+
+
+
+
+
+
+ -
+
+
+ 0
+
+
+
+ Netlist
+
+
- 0
+ 4
- 0
+ 4
- 0
+ 4
- 0
+ 4
-
-
-
- ...
-
-
-
- :/back_16.png:/back_16.png
-
-
- true
-
-
-
- -
-
-
- ...
-
-
-
- :/forward_16.png:/forward_16.png
-
-
- true
-
-
-
- -
-
-
- Show more information about nets
-
-
- ...
-
-
-
- :/info_16.png:/info_16.png
-
-
- true
-
-
-
- -
-
-
- ...
-
-
-
- :/run.png:/run.png
-
-
- F5
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
+
-
- 1
- 0
+
+ 0
+ 1
-
-
- 0
- 0
-
+
+ QFrame::NoFrame
-
-
- 250
- 16777215
-
+
+ QFrame::Raised
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+
+ 0
+ 0
+
+
+
+ 100
+
+
+
+
+
+ 1
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ Qt::ActionsContextMenu
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+
+
+
- -
-
-
- Find in netlist
-
-
- ...
-
-
-
- :/find.png:/find.png
-
-
- true
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 6
- 20
-
-
-
-
-
- -
-
-
- 1
-
-
-
- Netlist
-
-
-
- 4
-
-
- 4
-
-
- 4
-
-
- 4
-
-
-
-
-
-
- 0
- 1
-
-
-
- QFrame::NoFrame
-
-
- QFrame::Raised
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- Qt::Horizontal
-
-
-
-
- 0
- 0
-
-
-
- 100
-
-
-
-
-
- 1
- 0
-
-
-
-
- 0
- 0
-
-
-
- Qt::ActionsContextMenu
-
-
- QAbstractItemView::ExtendedSelection
-
-
- QAbstractItemView::SelectRows
-
-
- true
-
-
- true
-
-
- true
-
-
- false
-
-
- false
-
-
- false
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- Schematic
-
-
-
- 4
-
-
- 4
-
-
- 4
-
-
- 4
-
- -
-
-
-
- 0
- 1
-
-
-
- QFrame::NoFrame
-
-
- QFrame::Raised
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- Qt::Horizontal
-
-
-
-
- 0
- 0
-
-
-
- 100
-
-
-
-
-
- 1
- 0
-
-
-
-
- 0
- 0
-
-
-
- Qt::ActionsContextMenu
-
-
- QAbstractItemView::ExtendedSelection
-
-
- QAbstractItemView::SelectRows
-
-
- true
-
-
- true
-
-
- true
-
-
- false
-
-
- false
-
-
- false
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- Page
-
-
-
- 4
-
-
- 4
-
-
- 4
-
-
- 4
-
- -
-
-
-
- 0
- 1
-
-
-
- QFrame::NoFrame
-
-
- QFrame::Raised
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- Qt::Horizontal
-
-
-
-
- 0
- 0
-
-
-
- 100
-
-
-
-
-
- 1
- 0
-
-
-
-
- 0
- 0
-
-
-
- Qt::ActionsContextMenu
-
-
- QAbstractItemView::ExtendedSelection
-
-
- QAbstractItemView::SelectRows
-
-
- true
-
-
- true
-
-
- true
-
-
- false
-
-
- false
-
-
- false
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- Log
-
-
-
- 4
-
-
- 4
-
-
- 4
-
-
- 4
-
- -
-
-
-
-
-
-
- -
-
-
- QFrame::NoFrame
-
-
- QFrame::Raised
-
-
+
+
+ Schematic
+
+
- 0
+ 4
- 0
+ 4
- 0
+ 4
- 0
+ 4
-
-
-
- TextLabel
+
+
+
+ 0
+ 1
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Raised
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+
+ 0
+ 0
+
+
+
+ 100
+
+
+
+
+
+ 1
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ Qt::ActionsContextMenu
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+
+
+
-
-
-
+
+
+ Cross Reference
+
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+ -
+
+
+
+ 0
+ 1
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Raised
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+
+ 0
+ 0
+
+
+
+ 100
+
+
+
+
+
+ 1
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ Qt::ActionsContextMenu
+
+
+ QAbstractItemView::ExtendedSelection
+
+
+ QAbstractItemView::SelectRows
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+ Log
+
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+
+ 4
+
+ -
+
+
+
+
+
+
+ -
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Raised
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ TextLabel
+
+
+
+
+
+
+
diff --git a/src/layui/layui/layNetlistBrowserPage.cc b/src/layui/layui/layNetlistBrowserPage.cc
index 42d67ec2c..639ac3a58 100644
--- a/src/layui/layui/layNetlistBrowserPage.cc
+++ b/src/layui/layui/layNetlistBrowserPage.cc
@@ -738,7 +738,7 @@ NetlistBrowserPage::navigate_to (const QModelIndex &index, bool fwd)
add_to_history (index, fwd);
- selection_changed (directory_tree, hierarchy_tree);
+ selection_changed (hierarchy_tree, directory_tree);
}
void
@@ -985,11 +985,18 @@ NetlistBrowserPage::set_db (db::LayoutToNetlist *l2ndb)
rerun_button->setToolTip (QString ());
}
+ // @@@ how to hide?
bool is_lvsdb = (lvsdb != 0);
- mode_tab->widget (0)->setVisible (true);
- mode_tab->widget (1)->setVisible (is_lvsdb);
- mode_tab->widget (2)->setVisible (is_lvsdb);
- mode_tab->widget (3)->setVisible (is_lvsdb);
+ mode_tab->setTabEnabled (0, true);
+ mode_tab->setTabEnabled (1, is_lvsdb);
+ mode_tab->setTabEnabled (2, is_lvsdb);
+ mode_tab->setTabEnabled (3, is_lvsdb);
+
+ if (is_lvsdb) {
+ mode_tab->setCurrentIndex (2);
+ } else {
+ mode_tab->setCurrentIndex (0);
+ }
clear_highlights ();
@@ -1082,7 +1089,7 @@ NetlistBrowserPage::setup_trees ()
// @@@ should be schematic
NetlistBrowserModel *new_model = new NetlistBrowserModel (sch_directory_tree, l2ndb, &m_colorizer);
- set_tree_model (nl_directory_tree, new_model);
+ set_tree_model (sch_directory_tree, new_model);
connect (sch_directory_tree->selectionModel (), SIGNAL (currentChanged (const QModelIndex &, const QModelIndex &)), this, SLOT (sch_current_index_changed (const QModelIndex &)));
connect (sch_directory_tree->selectionModel (), SIGNAL (selectionChanged (const QItemSelection &, const QItemSelection &)), this, SLOT (sch_selection_changed ()));
@@ -1102,7 +1109,7 @@ NetlistBrowserPage::setup_trees ()
// NOTE: with the tree as the parent, the tree will take over ownership of the model
NetlistBrowserModel *new_model = new NetlistBrowserModel (xref_directory_tree, lvsdb, &m_colorizer);
- set_tree_model (nl_directory_tree, new_model);
+ set_tree_model (xref_directory_tree, new_model);
connect (xref_directory_tree->selectionModel (), SIGNAL (currentChanged (const QModelIndex &, const QModelIndex &)), this, SLOT (xref_current_index_changed (const QModelIndex &)));
connect (xref_directory_tree->selectionModel (), SIGNAL (selectionChanged (const QItemSelection &, const QItemSelection &)), this, SLOT (xref_selection_changed ()));
@@ -1120,7 +1127,7 @@ NetlistBrowserPage::setup_trees ()
{
// NOTE: with the tree as the parent, the tree will take over ownership of the model
NetlistBrowserTreeModel *new_hierarchy_model = new NetlistBrowserTreeModel (nl_hierarchy_tree, l2ndb);
- set_tree_model (nl_directory_tree, new_hierarchy_model);
+ set_tree_model (nl_hierarchy_tree, new_hierarchy_model);
connect (nl_hierarchy_tree->selectionModel (), SIGNAL (currentChanged (const QModelIndex &, const QModelIndex &)), this, SLOT (nl_current_tree_index_changed (const QModelIndex &)));
}
@@ -1129,7 +1136,7 @@ NetlistBrowserPage::setup_trees ()
// NOTE: with the tree as the parent, the tree will take over ownership of the model
NetlistBrowserTreeModel *new_hierarchy_model = new NetlistBrowserTreeModel (sch_hierarchy_tree, l2ndb);
- set_tree_model (sch_directory_tree, new_hierarchy_model);
+ set_tree_model (sch_hierarchy_tree, new_hierarchy_model);
connect (sch_hierarchy_tree->selectionModel (), SIGNAL (currentChanged (const QModelIndex &, const QModelIndex &)), this, SLOT (sch_current_tree_index_changed (const QModelIndex &)));
@@ -1144,7 +1151,7 @@ NetlistBrowserPage::setup_trees ()
// NOTE: with the tree as the parent, the tree will take over ownership of the model
NetlistBrowserTreeModel *new_hierarchy_model = new NetlistBrowserTreeModel (xref_hierarchy_tree, lvsdb);
- set_tree_model (xref_directory_tree, new_hierarchy_model);
+ set_tree_model (xref_hierarchy_tree, new_hierarchy_model);
connect (xref_hierarchy_tree->selectionModel (), SIGNAL (currentChanged (const QModelIndex &, const QModelIndex &)), this, SLOT (xref_current_tree_index_changed (const QModelIndex &)));