Bugfixed last commit

This commit is contained in:
Matthias Koefferlein 2023-09-10 22:51:22 +02:00
parent 22bab6d6a6
commit 64bcc6bb65
3 changed files with 7 additions and 6 deletions

View File

@ -701,7 +701,7 @@ Cell::clear_parent_insts (size_t sz)
void void
Cell::sort_child_insts () Cell::sort_child_insts ()
{ {
m_instances.sort_child_insts (); m_instances.sort_child_insts (false);
} }
std::pair<bool, db::pcell_id_type> std::pair<bool, db::pcell_id_type>

View File

@ -1387,9 +1387,9 @@ struct cell_inst_compare_f
}; };
void void
Instances::sort_child_insts () Instances::sort_child_insts (bool force)
{ {
if (! instance_by_cell_index_needs_made ()) { if (! force && ! instance_by_cell_index_needs_made ()) {
return; return;
} }
set_instance_by_cell_index_needs_made (false); set_instance_by_cell_index_needs_made (false);
@ -1440,7 +1440,7 @@ Instances::sort_inst_tree (const Layout *g, bool force)
} else { } else {
m_generic.unstable_tree->sort (cell_inst_array_box_converter (*g)); m_generic.unstable_tree->sort (cell_inst_array_box_converter (*g));
// since we use unstable instance trees in non-editable mode, we need to resort the child instances in this case // since we use unstable instance trees in non-editable mode, we need to resort the child instances in this case
sort_child_insts (); sort_child_insts (true);
} }
} }
if (m_generic_wp.any) { if (m_generic_wp.any) {
@ -1449,7 +1449,7 @@ Instances::sort_inst_tree (const Layout *g, bool force)
} else { } else {
m_generic_wp.unstable_tree->sort (cell_inst_wp_array_box_converter (*g)); m_generic_wp.unstable_tree->sort (cell_inst_wp_array_box_converter (*g));
// since we use unstable instance trees in non-editable mode, we need to resort the child instances in this case // since we use unstable instance trees in non-editable mode, we need to resort the child instances in this case
sort_child_insts (); sort_child_insts (true);
} }
} }

View File

@ -1547,8 +1547,9 @@ public:
/** /**
* @brief Establish the instance index list giving the instances by cell index * @brief Establish the instance index list giving the instances by cell index
* If force is true, the instance tree is always sorted.
*/ */
void sort_child_insts (); void sort_child_insts (bool force);
/** /**
* @brief Sort the cell instance list * @brief Sort the cell instance list