| 68 | } |
| 69 | |
| 70 | static bool |
| 71 | validate_cell_path (const db::Layout &layout, lay::LayoutViewBase::cell_path_type &path) |
| 72 | { |
| 73 | for (size_t i = 0; i < path.size (); ++i) { |
| 74 | |
| 75 | if (! layout.is_valid_cell_index (path [i])) { |
| 76 | |
| 77 | if (layout.is_valid_cell_index (path.back ())) { |
| 78 | // use a stub path |
| 79 | path.erase (path.begin (), --path.end ()); |
| 80 | } else { |
| 81 | // strip everything that is not valid |
| 82 | path.erase (path.begin () + i, path.end ()); |
| 83 | } |
| 84 | |
| 85 | return true; |
| 86 | |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | return false; |
| 91 | } |
| 92 | |
| 93 | LayoutViewFunctions::LayoutViewFunctions (db::Manager *manager, LayoutViewBase *view) |
| 94 | : lay::Plugin (view), mp_view (view), mp_manager (manager) |
no test coverage detected