Skip to content

Commit 7cbc597

Browse files
authored
fixed the issue of blocks getting hidden in canvas (sugarlabs#4460)
1 parent 728ecf4 commit 7cbc597

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

js/turtles.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,10 +1016,7 @@ Turtles.TurtlesView = class {
10161016
menuIcon.innerHTML = "menu";
10171017
docById("toggleAuxBtn").className -= "blue darken-1";
10181018
}
1019-
// Store the currently selected grid
1020-
if (this.activity.turtles.currentGrid !== undefined) {
1021-
this.selectedGrid = this.activity.turtles.currentGrid;
1022-
}
1019+
10231020
this._expandButton.style.visibility = "visible";
10241021
this._collapseButton.style.visibility = "hidden";
10251022
this.gridButton.style.visibility = "hidden";
@@ -1117,11 +1114,7 @@ Turtles.TurtlesView = class {
11171114
}
11181115

11191116
// Restore the previously selected grid
1120-
if (this.selectedGrid !== undefined) {
1121-
this.activity.turtles.currentGrid = this.selectedGrid;
1122-
this.activity.turtles.doGrid(this.selectedGrid);
1123-
} else {
1124-
this.activity.turtles.currentGrid = 0;
1117+
if (this.currentGrid !== null) {
11251118
this.activity.turtles.doGrid(0);
11261119
}
11271120

0 commit comments

Comments
 (0)