mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-26 22:30:27 -04:00
Add "project changed" event
And emit it whenever we think the project has changed. Try to not emit it when a change has happened internally that shouldn't affect the serialized project. This iteration fires the event too frequently, e.g., when switching sprites. This is meant as a simple initial implementation that can be improved.
This commit is contained in:
parent
e071cf3c0c
commit
5022227c15
3 changed files with 31 additions and 4 deletions
src/engine
|
@ -487,6 +487,10 @@ class Blocks {
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// forceNoGlow is set to true on containers that don't affect the project serialization,
|
||||
// e.g., the toolbox or monitor containers.
|
||||
if (optRuntime && !this.forceNoGlow) optRuntime.emitProjectChanged();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue