Skip to content

Commit 7026cad

Browse files
author
Matthias Koefferlein
committed
Fixing issue #2220 (select fails to select from 2nd layout when two are loaded in same panel)
1 parent dacb323 commit 7026cad

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/laybasic/laybasic/layFinder.cc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -805,8 +805,12 @@ InstFinder::find_internal (LayoutViewBase *view, unsigned int cv_index, const db
805805
void
806806
InstFinder::checkpoint ()
807807
{
808-
if (--m_tries < 0) {
809-
throw StopException ();
808+
if (! point_mode ()) {
809+
++*mp_progress;
810+
} else {
811+
if (--m_tries < 0) {
812+
throw StopException ();
813+
}
810814
}
811815
}
812816

@@ -829,15 +833,13 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d
829833

830834
if (! point_mode ()) {
831835

832-
++*mp_progress;
833-
834836
// look for instances to check here ..
835837
for (db::Cell::touching_iterator inst = cell.begin_touching (search_box); ! inst.at_end (); ++inst) {
836838

837839
const db::CellInstArray &cell_inst = inst->cell_inst ();
838840
const db::Cell &inst_cell = layout ().cell (cell_inst.object ().cell_index ());
839841

840-
++*mp_progress;
842+
checkpoint ();
841843

842844
if (! consider_cell (inst_cell)) {
843845
continue;
@@ -851,7 +853,7 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d
851853
db::box_convert <db::CellInst, false> bc (layout ());
852854
for (db::CellInstArray::iterator p = cell_inst.begin_touching (search_box, bc); ! p.at_end (); ++p) {
853855

854-
++*mp_progress;
856+
checkpoint ();
855857

856858
db::Box ibox;
857859
if (! m_visible_layers || level == mp_view->get_max_hier_levels () - 1 || inst_cell.is_ghost_cell () || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) {

0 commit comments

Comments
 (0)