Skip to content

Commit b7bda21

Browse files
Merge pull request #2228 from KLayout/bugfix/issue-2220
Fixing issue #2220 (select fails to select from 2nd layout when two a…
2 parents 4f30ad3 + 7026cad commit b7bda21

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
@@ -811,8 +811,12 @@ InstFinder::find_internal (LayoutViewBase *view, unsigned int cv_index, const db
811811
void
812812
InstFinder::checkpoint ()
813813
{
814-
if (--m_tries < 0) {
815-
throw StopException ();
814+
if (! point_mode ()) {
815+
++*mp_progress;
816+
} else {
817+
if (--m_tries < 0) {
818+
throw StopException ();
819+
}
816820
}
817821
}
818822

@@ -835,15 +839,13 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d
835839

836840
if (! point_mode ()) {
837841

838-
++*mp_progress;
839-
840842
// look for instances to check here ..
841843
for (db::Cell::touching_iterator inst = cell.begin_touching (search_box); ! inst.at_end (); ++inst) {
842844

843845
const db::CellInstArray &cell_inst = inst->cell_inst ();
844846
const db::Cell &inst_cell = layout ().cell (cell_inst.object ().cell_index ());
845847

846-
++*mp_progress;
848+
checkpoint ();
847849

848850
if (! consider_cell (inst_cell)) {
849851
continue;
@@ -857,7 +859,7 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d
857859
db::box_convert <db::CellInst, false> bc (layout ());
858860
for (db::CellInstArray::iterator p = cell_inst.begin_touching (search_box, bc); ! p.at_end (); ++p) {
859861

860-
++*mp_progress;
862+
checkpoint ();
861863

862864
db::Box ibox;
863865
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)