mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2026-10-25 00:02:16 +00:00
Make asset undo/redo reliable
This commit is contained in:
1 parent
b3a9ebd5cd
commit
586a6530e5
1 file changed
+6
@@ -177,6 +177,9 @@ export class ProjectWindows {
|
||||
var wnd = this.id2window[fileid];
|
||||
if (wnd && wnd.undoStep) {
|
||||
wnd.undoStep();
|
||||
if (wnd.getValue) {
|
||||
this.project.updateFile(fileid, wnd.getValue());
|
||||
}
|
||||
this.redofiles.push(fileid);
|
||||
this.refresh(false);
|
||||
} else {
|
||||
@@ -189,6 +192,9 @@ export class ProjectWindows {
|
||||
var wnd = this.id2window[fileid];
|
||||
if (wnd && wnd.redoStep) {
|
||||
wnd.redoStep();
|
||||
if (wnd.getValue) {
|
||||
this.project.updateFile(fileid, wnd.getValue());
|
||||
}
|
||||
this.undofiles.push(fileid);
|
||||
this.refresh(false);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user