mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-18 15:26:19 +08:00
Merge pull request #1655 from bridge-core/feat/saved-state-event
feat: saved state changed event
This commit is contained in:
commit
0153d9fc13
@ -104,6 +104,12 @@ class ModelProject {
|
|||||||
}
|
}
|
||||||
set saved(saved) {
|
set saved(saved) {
|
||||||
this._saved = saved;
|
this._saved = saved;
|
||||||
|
|
||||||
|
// Dispatch an event to allow other scripts to react to the change
|
||||||
|
Blockbench.dispatchEvent('saved_state_changed', {
|
||||||
|
project: this,
|
||||||
|
saved: saved
|
||||||
|
});
|
||||||
if (Project == this) {
|
if (Project == this) {
|
||||||
setProjectTitle(this.name);
|
setProjectTitle(this.name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user