Merge pull request #488 from yueyuzhao/issue/484-pbs-save-story

PBS: Fix story-save
This commit is contained in:
chrisgarrity 2021-08-11 12:17:03 -04:00 committed by GitHub
commit ad285235a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -374,7 +374,12 @@ export default class ScratchJr {
Project.prepareToSave(currentProject, onDone); Project.prepareToSave(currentProject, onDone);
}); });
}, true); }, true);
} else if (ScratchJr.isEditable() && currentProject && !Project.error && changed) { } else if (ScratchJr.isEditable()
&& editmode != 'storyStarter'
&& currentProject
&& !Project.error
&& changed
) {
Project.prepareToSave(currentProject, onDone); Project.prepareToSave(currentProject, onDone);
} else { } else {
if (onDone) { if (onDone) {

View file

@ -182,6 +182,8 @@ export default class ScriptsPane {
var dx = localx(sc, el.left); var dx = localx(sc, el.left);
var dy = localy(sc, el.top); var dy = localy(sc, el.top);
ScriptsPane.blockDropped(sc, dx, dy); ScriptsPane.blockDropped(sc, dx, dy);
// Start the story if scripts is changed.
ScratchJr.storyStart('ScriptsPane.changed');
break; break;
case 'library': case 'library':
var thumb = Palette.getHittedThumb(el, gn('spritecc')); var thumb = Palette.getHittedThumb(el, gn('spritecc'));