An optimization introduced in Prefab mode currently changes the relative ordering of children, causing stale QModelIndex variables to still be referenced and crash the Editor sporadically. This change is theoretically a bit slower, but still much faster than the pre-optimization times. Co-authored-by: Shirang Jia <shiranj@amazon.com> Co-authored-by: Shirang Jia <shiranj@amazon.com>
This commit is contained in:
+3
-2
@@ -1344,14 +1344,15 @@ namespace AzToolsFramework
|
||||
emit EnableSelectionUpdates(false);
|
||||
auto parentIndex = GetIndexFromEntity(parentId);
|
||||
auto childIndex = GetIndexFromEntity(childId);
|
||||
beginRemoveRows(parentIndex, childIndex.row(), childIndex.row());
|
||||
beginResetModel();
|
||||
}
|
||||
|
||||
void EntityOutlinerListModel::OnEntityInfoUpdatedRemoveChildEnd(AZ::EntityId parentId, AZ::EntityId childId)
|
||||
{
|
||||
(void)childId;
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
endRemoveRows();
|
||||
|
||||
endResetModel();
|
||||
|
||||
//must refresh partial lock/visibility of parents
|
||||
m_isFilterDirty = true;
|
||||
|
||||
Reference in New Issue
Block a user