Skip to content

Commit dc02f75

Browse files
committed
Also refresh the asset editor if it's the active view
1 parent a44de9e commit dc02f75

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/ide/ui.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ async function initProject() {
261261
current_project.callbackBuildStatus = (busy: boolean) => {
262262
setBusyStatus(busy);
263263
};
264-
// Update views when file contents change.
264+
// Update file views when file contents change.
265265
current_project.onFileChanged = (path: string, data: FileData) => {
266266
var wnd = projectWindows.id2window[path];
267267
if (wnd) {
@@ -273,6 +273,11 @@ async function initProject() {
273273
console.warn('onFileChanged: unknown view or data type');
274274
}
275275
}
276+
// Also refresh the asset editor if it's the active view.
277+
var assetWnd = projectWindows.id2window['#asseteditor'];
278+
if (assetWnd && assetWnd === projectWindows.getActive()) {
279+
assetWnd.refresh(true);
280+
}
276281
};
277282
}
278283

0 commit comments

Comments
 (0)