diff --git a/src/laybasic/laybasic/layFinder.cc b/src/laybasic/laybasic/layFinder.cc index bce8845b6..6d187ea67 100644 --- a/src/laybasic/laybasic/layFinder.cc +++ b/src/laybasic/laybasic/layFinder.cc @@ -217,7 +217,8 @@ Finder::do_find (const db::Cell &cell, int level, const db::DCplxTrans &vp, cons } else if (level < m_max_level && (t * m_cell_box_convert (cell)).touches (m_scan_region) && (mp_view->select_inside_pcells_mode () || !cell.is_proxy ()) - && !mp_view->is_cell_hidden (cell.cell_index (), m_cv_index)) { + && !mp_view->is_cell_hidden (cell.cell_index (), m_cv_index) + && !cell.is_ghost_cell ()) { db::ICplxTrans it = t.inverted (); db::Box scan_box (it * m_scan_region); @@ -828,7 +829,7 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d // just consider the instances exactly at the last level of // hierarchy (this is where the boxes are drawn) or of cells that // are hidden. - if (level == max_level () - 1 || inst_cell.is_proxy () || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { + if (level == max_level () - 1 || inst_cell.is_proxy () || inst_cell.is_ghost_cell () || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { db::box_convert bc (layout ()); for (db::CellInstArray::iterator p = cell_inst.begin_touching (search_box, bc); ! p.at_end (); ++p) { @@ -838,7 +839,7 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d db::Box ibox; if (inst_cell.bbox_with_empty ().empty ()) { ibox = db::Box (db::Point (0, 0), db::Point (0, 0)); - } else if (! m_visible_layers || level == mp_view->get_max_hier_levels () - 1 || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { + } else 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)) { ibox = inst_cell.bbox_with_empty (); } else { for (std::vector::const_iterator l = m_visible_layer_indexes.begin (); l != m_visible_layer_indexes.end (); ++l) { @@ -903,7 +904,7 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d // just consider the instances exactly at the last level of // hierarchy (this is where the boxes are drawn) or if of cells that // are hidden. - if (level == max_level () - 1 || inst_cell.is_proxy () || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { + if (level == max_level () - 1 || inst_cell.is_proxy () || inst_cell.is_ghost_cell () || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { db::box_convert bc (layout ()); for (db::CellInstArray::iterator p = cell_inst.begin_touching (search_box, bc); ! p.at_end (); ++p) { @@ -916,7 +917,7 @@ InstFinder::visit_cell (const db::Cell &cell, const db::Box &search_box, const d db::Box ibox; if (inst_cell.bbox_with_empty ().empty ()) { ibox = db::Box (db::Point (0, 0), db::Point (0, 0)); - } else if (! m_visible_layers || level == mp_view->get_max_hier_levels () - 1 || mp_view->is_cell_hidden (inst_cell.cell_index (), m_cv_index)) { + } else 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)) { ibox = inst_cell.bbox_with_empty (); } else { for (std::vector::const_iterator l = m_visible_layer_indexes.begin (); l != m_visible_layer_indexes.end (); ++l) {