Skip to content

Commit

Permalink
Keep edit layer info with undo record
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Nov 27, 2024
1 parent 223b622 commit e22c800
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fontra/views/editor/scene-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,8 @@ export class SceneController {
redoSelection: this.selection,
fontLocation: this.sceneSettings.fontLocationSourceMapped,
glyphLocation: this.sceneSettings.glyphLocation,
editingLayers: this.sceneSettings.editingLayers,
editLayerName: this.sceneSettings.editLayerName,
};
if (!this._cancelGlyphEditing) {
editContext.editFinal(
Expand Down Expand Up @@ -1198,6 +1200,8 @@ export class SceneController {
// the glyph data (eg. a source being there or not)
this.sceneSettings.fontLocationSourceMapped = { ...undoInfo.fontLocation };
this.sceneSettings.glyphLocation = { ...undoInfo.glyphLocation };
this.sceneSettings.editingLayers = undoInfo.editingLayers;
this.sceneSettings.editLayerName = undoInfo.editLayerName;
}
await this.sceneModel.updateScene();
this.canvasController.requestUpdate();
Expand Down

0 comments on commit e22c800

Please sign in to comment.