fix commit ec2348b1e (drawingContentsHasChanged)

This commit is contained in:
abakkk 2020-01-04 16:07:53 +01:00
parent 5997c9cba3
commit 04b119557f
1 changed files with 6 additions and 4 deletions

10
draw.js
View File

@ -699,9 +699,10 @@ var DrawingArea = new Lang.Class({
GLib.file_set_contents(path, contents); GLib.file_set_contents(path, contents);
if (notify) if (notify)
this.emit('show-osd', 'document-save-symbolic', name, -1); this.emit('show-osd', 'document-save-symbolic', name, -1);
if (name != DEFAULT_FILE_NAME) if (name != DEFAULT_FILE_NAME) {
this.jsonName = name; this.jsonName = name;
this.lastJsonContents = contents; this.lastJsonContents = contents;
}
} }
}, },
@ -732,9 +733,10 @@ var DrawingArea = new Lang.Class({
if (notify) if (notify)
this.emit('show-osd', 'document-open-symbolic', name, -1); this.emit('show-osd', 'document-open-symbolic', name, -1);
if (name != DEFAULT_FILE_NAME) if (name != DEFAULT_FILE_NAME) {
this.jsonName = name; this.jsonName = name;
this.lastJsonContents = contents; this.lastJsonContents = contents;
}
}, },
_loadPersistent: function() { _loadPersistent: function() {