kopia lustrzana https://github.com/backface/turtlestitch
Merge pull request #1429 from thomaswp/xml-parse-error-fix
Fixed #1428, an issue with preview the (empty) project placeholder.dev
commit
9b6449c8f7
21
gui.js
21
gui.js
|
@ -5507,16 +5507,19 @@ ProjectDialogMorph.prototype.setSource = function (source) {
|
|||
if (myself.task === 'open') {
|
||||
|
||||
src = localStorage['-snap-project-' + item.name];
|
||||
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.cachedTexture = null;
|
||||
myself.preview.drawNew();
|
||||
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.cachedTexture = null;
|
||||
myself.preview.drawNew();
|
||||
}
|
||||
}
|
||||
myself.edit();
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue