Skip to content

Commit

Permalink
Respond to source index change immediately; pass editLayerName in get…
Browse files Browse the repository at this point in the history
…SelectedStaticGlyphController and getGlyphInstance
  • Loading branch information
justvanrossum committed Sep 19, 2023
1 parent 0d389b0 commit 7eb9599
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/fontra/views/editor/scene-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ export class SceneController {
const location = varGlyphController.mapSourceLocationToGlobal(sourceIndex);

this.sceneSettingsController.setItem("location", location, { senderID: this });
}
},
true
);

// Set up convenience property "selectedGlyphName"
Expand Down
7 changes: 5 additions & 2 deletions src/fontra/views/editor/scene-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ export class SceneModel {
}

async getSelectedStaticGlyphController() {
return await this.getGlyphInstance(this.sceneSettings.selectedGlyphName);
return await this.getGlyphInstance(
this.sceneSettings.selectedGlyphName,
this.sceneSettings.editLayerName
);
}

getGlobalLocation() {
Expand Down Expand Up @@ -397,7 +400,7 @@ export class SceneModel {
...this._localLocations[glyphName],
...this.getGlobalLocation(),
};
return await this.fontController.getGlyphInstance(glyphName, location);
return await this.fontController.getGlyphInstance(glyphName, location, layerName);
}

selectionAtPoint(point, size, currentSelection, preferTCenter) {
Expand Down

0 comments on commit 7eb9599

Please sign in to comment.