Skip to content

Commit

Permalink
Merge pull request #1429 from thomaswp/xml-parse-error-fix
Browse files Browse the repository at this point in the history
Fixed #1428, an issue with preview the (empty) project placeholder.
  • Loading branch information
jmoenig authored Oct 16, 2016
2 parents 1e4bb8a + 06c7ad8 commit 9b6449c
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};
Expand Down

0 comments on commit 9b6449c

Please sign in to comment.