Skip to content

Commit e065e20

Browse files
committed
Make asset undo/redo reliable
1 parent f8d3298 commit e065e20

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
@@ -157,6 +157,9 @@ export class ProjectWindows {
157157
var wnd = this.id2window[fileid];
158158
if (wnd && wnd.undoStep) {
159159
wnd.undoStep();
160+
if (wnd.getValue) {
161+
this.project.updateFile(fileid, wnd.getValue());
162+
}
160163
this.redofiles.push(fileid);
161164
this.refresh(false);
162165
} else {
@@ -169,6 +172,9 @@ export class ProjectWindows {
169172
var wnd = this.id2window[fileid];
170173
if (wnd && wnd.redoStep) {
171174
wnd.redoStep();
175+
if (wnd.getValue) {
176+
this.project.updateFile(fileid, wnd.getValue());
177+
}
172178
this.undofiles.push(fileid);
173179
this.refresh(false);
174180
} else {

0 commit comments

Comments
 (0)