WIP: better probing of nets, fixed a bug when hiding browser.

This commit is contained in:
Matthias Koefferlein 2019-06-22 11:34:44 +02:00
parent 46dafd50ea
commit 4f41d99126
2 changed files with 11 additions and 15 deletions

View File

@ -262,21 +262,26 @@ NetlistBrowserDialog::probe_net (const db::DPoint &p, bool trace_path)
// determines the corresponding layer inside the database and probe the net from this region and the
// start point.
db::Region *region = 0;
std::vector<db::Region *> regions;
const db::Connectivity &conn = l2ndb->connectivity ();
for (db::Connectivity::layer_iterator layer = conn.begin_layers (); layer != conn.end_layers (); ++layer) {
db::LayerProperties lp = l2ndb->internal_layout ()->get_properties (*layer);
if (! lp.is_null () && lp == cv->layout ().get_properties (start_layer)) {
region = l2ndb->layer_by_index (*layer);
break;
if (! lp.is_null ()) {
db::Region *region = l2ndb->layer_by_index (*layer);
if (lp == cv->layout ().get_properties (start_layer)) {
// a matching original layer is looked up with higher prio
regions.insert (regions.begin (), region);
} else {
regions.push_back (region);
}
}
}
// probe the net
if (region) {
net = l2ndb->probe_net (*region, start_point);
for (std::vector<db::Region *>::const_iterator r = regions.begin (); r != regions.end () && !net; ++r) {
net = l2ndb->probe_net (**r, start_point);
}
}
@ -723,12 +728,6 @@ NetlistBrowserDialog::update_content ()
}
}
void
NetlistBrowserDialog::hideEvent (QHideEvent *)
{
deactivated ();
}
void
NetlistBrowserDialog::deactivated ()
{

View File

@ -60,9 +60,6 @@ private:
// implementation of the lay::Plugin interface
virtual void menu_activated (const std::string &symbol);
// QWidget
virtual void hideEvent (QHideEvent *);
void cellviews_changed ();
void cellview_changed (int index);
void l2ndbs_changed ();