Skip to content

Commit

Permalink
Refactor setTitleBar method to always invoke title update, even with …
Browse files Browse the repository at this point in the history
…empty filename
  • Loading branch information
stephanebouget committed Nov 27, 2024
1 parent 956c634 commit b452058
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/app/core/services/file-system.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,15 @@ export class FileSystemService {

setTitleBar(filename: string) {
// Set the filename to the title bar
if (filename) {
(async () => {
try {
await this.electronService.ipcRenderer?.invoke('set-title-bar-name', {
title: 'Khiops Visualization ' + filename,
});
} catch (error) {
console.log('error', error);
}
})();
}
(async () => {
try {
await this.electronService.ipcRenderer?.invoke('set-title-bar-name', {
title: 'Khiops Visualization ' + filename,
});
} catch (error) {
console.log('error', error);
}
})();
}

openFile(filename: string, callbackDone?: Function) {
Expand Down Expand Up @@ -214,6 +212,7 @@ export class FileSystemService {
this.initialize();
this.ngzone.run(() => {
this.configService.setDatas();
this.setTitleBar('');
});
}

Expand Down

0 comments on commit b452058

Please sign in to comment.