Fixed a crash in the netlist browser (pending highlights while netlist has been changed)

This commit is contained in:
Matthias Koefferlein
2021-03-14 10:01:51 +01:00
parent 9e3183250f
commit 518145fd3e
3 changed files with 14 additions and 3 deletions
+11 -3
View File
@@ -800,7 +800,7 @@ NetlistBrowserPage::set_db (db::LayoutToNetlist *l2ndb)
show_xref->setChecked (lvsdb != 0);
m_signals_enabled = se;
clear_markers ();
clear_highlights ();
m_cell_context_cache = db::ContextCache (mp_database.get () ? mp_database->internal_layout () : 0);
@@ -892,6 +892,15 @@ NetlistBrowserPage::setup_trees ()
find_text->setText (QString ());
}
void
NetlistBrowserPage::clear_highlights ()
{
m_current_path = lay::NetlistObjectsPath ();
m_selected_paths.clear ();
update_highlights ();
}
void
NetlistBrowserPage::highlight (const NetlistObjectsPath &current_path, const std::vector<NetlistObjectsPath> &selected_paths)
{
@@ -900,9 +909,8 @@ NetlistBrowserPage::highlight (const NetlistObjectsPath &current_path, const std
m_current_path = current_path;
m_selected_paths = selected_paths;
clear_markers ();
adjust_view ();
update_highlights ();
adjust_view ();
}
}
@@ -247,6 +247,7 @@ private:
void adjust_view ();
void clear_markers ();
void highlight (const NetlistObjectsPath &current_path, const std::vector<NetlistObjectsPath> &selected_paths);
void clear_highlights ();
std::vector<const db::Net *> selected_nets ();
std::vector<const db::Device *> selected_devices ();
std::vector<const db::SubCircuit *> selected_subcircuits ();