Skip to content

Commit

Permalink
Make sure the graph config fileInfo is set on load. Fixes bug where u…
Browse files Browse the repository at this point in the history
…sers would be asked to set a filename after loading.
  • Loading branch information
james-strauss-uwa committed Aug 7, 2024
1 parent 19a7af6 commit e57b216
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Eagle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2302,6 +2302,16 @@ export class Eagle {
const graphConfig = GraphConfig.fromJson(dataObject, errorsWarnings);
this.graphConfig(graphConfig);

// set fileInfo
this.graphConfig().fileInfo().repositoryName = file.repository.name;
this.graphConfig().fileInfo().repositoryBranch = file.repository.branch;
this.graphConfig().fileInfo().repositoryService = file.repository.service;
this.graphConfig().fileInfo().path = file.path;
this.graphConfig().fileInfo().name = file.name;

// communicate to knockout that the value of the fileInfo has been modified (so it can update UI)
this.graphConfig().fileInfo.valueHasMutated();

this._handleLoadingErrors(errorsWarnings, file.name, file.repository.service);

this.rightWindow().mode(Eagle.RightWindowMode.TranslationMenu);
Expand Down

0 comments on commit e57b216

Please sign in to comment.