From 639871311dd15ff70d034bd87522c62c37d862ff Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 28 Apr 2021 14:25:48 +0200 Subject: [PATCH] only show scene album if the project has more than a single scene --- HISTORY.md | 3 +++ snap.html | 2 +- src/gui.js | 19 ++++++++++++------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 1ca5cb91..b6721a2d 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,6 +8,9 @@ * **Notable Fixes:** * made scrollbars in the wardrobe and jukebox more responsive +### 2021-04-28 +* gui: only show scene album if the project has more than a single scene + ### 2021-04-23 * store: serialize sprite-order from scenes * gui: sceneified refreshIDE() diff --git a/snap.html b/snap.html index ca03a8ac..3d0d10b3 100755 --- a/snap.html +++ b/snap.html @@ -12,7 +12,7 @@ - + diff --git a/src/gui.js b/src/gui.js index 534ab6dc..e3514daa 100644 --- a/src/gui.js +++ b/src/gui.js @@ -83,7 +83,7 @@ Animation, BoxMorph, BlockEditorMorph, BlockDialogMorph, Project, ZERO, BLACK*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2021-April-23'; +modules.gui = '2021-April-28'; // Declarations @@ -1930,15 +1930,20 @@ IDE_Morph.prototype.createCorral = function (keepSceneAlbum) { this.corral.add(this.corral.album); this.corral.fixLayout = function () { - // this.stageIcon.setCenter(this.center()); // version before scenes - this.stageIcon.setTop(this.top()); + this.stageIcon.setCenter(this.center()); this.stageIcon.setLeft(this.left() + padding); // scenes +++ - this.album.setLeft(this.left()); - this.album.setTop(this.stageIcon.bottom() + padding); - this.album.setWidth(this.stageIcon.width() + padding * 2); - this.album.setHeight(this.height() - this.stageIcon.height() - padding); + if (myself.scenes.length() < 2) { + this.album.hide(); + } else { + this.stageIcon.setTop(this.top()); + this.album.show(); + this.album.setLeft(this.left()); + this.album.setTop(this.stageIcon.bottom() + padding); + this.album.setWidth(this.stageIcon.width() + padding * 2); + this.album.setHeight(this.height() - this.stageIcon.height() - padding); // +++ + } this.frame.setLeft(this.stageIcon.right() + padding); this.frame.setExtent(new Point(