kopia lustrzana https://github.com/backface/turtlestitch
Fixed #1428, an issue with preview the (empty) project placeholder.
The code treats this placeholder the same as any other proejct and attempts to open it, leading to a parse error.dev
rodzic
60942484e6
commit
06c7ad89a7
7
gui.js
7
gui.js
|
@ -5440,17 +5440,20 @@ ProjectDialogMorph.prototype.setSource = function (source) {
|
|||
if (myself.task === 'open') {
|
||||
|
||||
src = localStorage['-snap-project-' + item.name];
|
||||
|
||||
if (src) {
|
||||
xml = myself.ide.serializer.parse(src);
|
||||
|
||||
myself.notesText.text = xml.childNamed('notes').contents
|
||||
|| '';
|
||||
myself.notesText.drawNew();
|
||||
myself.notesField.contents.adjustBounds();
|
||||
myself.preview.texture = xml.childNamed('thumbnail').contents
|
||||
|| null;
|
||||
myself.preview.texture =
|
||||
xml.childNamed('thumbnail').contents || null;
|
||||
myself.preview.cachedTexture = null;
|
||||
myself.preview.drawNew();
|
||||
}
|
||||
}
|
||||
myself.edit();
|
||||
};
|
||||
} else { // 'examples'; 'cloud' is initialized elsewhere
|
||||
|
|
Ładowanie…
Reference in New Issue