Skip to content

Commit 235c3b9

Browse files
committed
Make asset undo/redo reliable
1 parent 7a5ecbb commit 235c3b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/ide/windows.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ export class ProjectWindows {
177177
var wnd = this.id2window[fileid];
178178
if (wnd && wnd.undoStep) {
179179
wnd.undoStep();
180+
if (wnd.getValue) {
181+
this.project.updateFile(fileid, wnd.getValue());
182+
}
180183
this.redofiles.push(fileid);
181184
this.refresh(false);
182185
} else {
@@ -189,6 +192,9 @@ export class ProjectWindows {
189192
var wnd = this.id2window[fileid];
190193
if (wnd && wnd.redoStep) {
191194
wnd.redoStep();
195+
if (wnd.getValue) {
196+
this.project.updateFile(fileid, wnd.getValue());
197+
}
192198
this.undofiles.push(fileid);
193199
this.refresh(false);
194200
} else {

0 commit comments

Comments
 (0)