* rewrite of the filter code to fix [LYN-4156][LYN-4545]
Signed-off-by: Alex Montgomery <alexmont@amazon.com>
* improved onRowCountChanged() per comments
Signed-off-by: Alex Montgomery <alexmont@amazon.com>
This has a small bundle of bugfixes and improvements all based around improving prefab TrackView support:
* JsonMerger - improved the error message when patch remove operations fail to make the specific failure more obvious
Instance - swapped the order of destroying entities vs clearing the lookup tables so that lookups still produce valid results during destruction. (This could happen while creating undo caches)
* InstanceEntityIdMapper - in the case where an id isn't found, it now returns an invalid id instead of an "attempted-valid" one that still generally turned out to be not-valid
* PrefabUndo - downgraded a potential crash to an error message if for some reason the patch contains changes to an entity that doesn't currently have an alias. (This case can be caused occasionally by other bugs and error conditions)
* EditorSequenceComponent - downgraded a potential crash to an assert for the times when it tries to remove components, fails, but thinks it succeeded. (This case can currently be caused by using Maestro with Prefabs enabled)
* EditorSequenceAgentComponent - added an undo cache refresh whenever the component deletes itself, so that deleting itself during an EditorSequenceComponent destruction chain of events leaves the undo cache in the correct state.
* SliceConverter - fixed the conversion of entity references in top-level slice instance entities that refer down to nested slice entities. There was a chicken-and-egg problem in terms of which entities need to be created first to make the references and the prefab patching & serialization happy. This was worked around by creating placeholder top-level entities, then the nested slice entities, then replacing the top-level entities with the fully-realized ones.
Specific changes:
* Added more informative error message.
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 672608a6c833c07295996cd9b3449825222b74d0)
* Changed the error condition to produce a "valid" invalid id instead of a deterministic but not-valid id
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 3673950c949de8e067b32ddafaffd07e648a13d8)
* Guard against invalid reference assert/crash
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 268d4ef3447f268a1372d07e028b9e67bac5c64e)
* Downgrade an invalid reference crash to an assert
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 38c9303770845f4e863273dd6fb8fc7e83380425)
* Improved logic for handling entity references across nested slices.
Signed-off-by: mbalfour <mbalfour@amazon.com>
(cherry picked from commit 7e89a016d95fb72cb5f119e1e3768daa60e6bfb4)
* Changed order of entities.clear() call so that instance lookups are still valid during entity destruction.
Signed-off-by: mbalfour <mbalfour@amazon.com>
* Add undo cache notification when removing Maestro components.
Signed-off-by: mbalfour <mbalfour@amazon.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
Remove warning when entities that aren't registered to instances get passed to the Prefab Undo Cache (just ignore them to avoid noise in the console).
Also avoid marking templates dirty when they are added.
* When loading a template to memory, store the current Source (potentially overriding what was stored to disk)
* Before storing the prefab disk, remove the Source parameter from the Dom (as it's no longer necessary to save it).
* Restore the code that display the dirty marker on the Level container. Ensure the dirty marker is cleared on level save.
* Moving call one level up to allow usage of the SaveTemplateToString function without clearing the dirty flag.