Stop marking older sprites as changed after loading (#232)
Loading filled every missing asset property with its `default`. For
Sort with parent that is `false`, while the gold mark and Reset compare
against `initial`, which is `true`. So every sprite, text and particle
source saved before #232 counted as changed once loaded, and each save
wrote the `false` into the project file.
- normalizeBag leaves a missing key missing when it has its own
`initial`. It still reads as `false`, so older projects draw as
before, but they no longer count as changed.
- e2e module 4 failed in CI on three checks since 8b44f97. Its Reset
click hit the extra Reset of Sort with parent instead of Height.
- The #232 test deleted the key on the object instead of going through
the load path. It now checks that loading keeps the key missing and
marks nothing. serialize.test.ts no longer expects the filled value.
Tests:
- ./check.sh: 167 files, 2435 tests, CHECK EXIT 0
- e2e 1-5 chained: ALL PASSED, 141 checks (before the fix the same
three module 4 checks failed locally, as in CI)
- Counter-check: without the fix the extended test fails
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
085e6c8cce
commit
74b9c60661
3 files changed
+7
-2
No files matched your search
@@ -177,7 +177,6 @@ describe('serialize', () => {
|
||||
rotation: 0,
|
||||
mirrorX: false,
|
||||
mirrorY: false,
|
||||
sortWithParent: false,
|
||||
width: 10,
|
||||
height: 100,
|
||||
color: 0xffffff,
|
||||
|
||||
Reference in new issue
Block a user