safety check for scroll to after paste entity
This commit is contained in:
parent
5b5a9342c3
commit
7e34edecdd
|
@ -49,7 +49,8 @@ namespace SHADE
|
||||||
data.createdEntities.clear();
|
data.createdEntities.clear();
|
||||||
data.createdEntities = SHSerialization::DeserializeEntitiesFromString(data.entityData, data.parentEID);
|
data.createdEntities = SHSerialization::DeserializeEntitiesFromString(data.entityData, data.parentEID);
|
||||||
data.entityData = SHSerialization::ResolveSerializedEntityIndices(data.entityData, data.createdEntities);
|
data.entityData = SHSerialization::ResolveSerializedEntityIndices(data.entityData, data.createdEntities);
|
||||||
SHEditorWindowManager::GetEditorWindow<SHHierarchyPanel>()->SetScrollTo(data.createdEntities.begin()->second);
|
if(!data.createdEntities.empty())
|
||||||
|
SHEditorWindowManager::GetEditorWindow<SHHierarchyPanel>()->SetScrollTo(data.createdEntities.begin()->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SHPasteEntitiesCommand::Undo()
|
void SHPasteEntitiesCommand::Undo()
|
||||||
|
|
Loading…
Reference in New Issue