Skip to content

Commit

Permalink
Select the right source layer item
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Nov 27, 2024
1 parent e22c800 commit 7b0c13a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/fontra/views/editor/panel-designspace-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,14 @@ export default class DesignspaceNavigationPanel extends Panel {

// TODO: keep track of the bg layer short name so we can switch sources/glyphs
// while staying in the "same" bg layer
this.sourceLayersList.setSelectedItemIndex(0);
const itemMatch = this.sourceLayersList.items.find(
(item) => item.fullName === this.sceneSettings.editLayerName
);
if (itemMatch) {
this.sourceLayersList.setSelectedItem(itemMatch);
} else {
this.sourceLayersList.setSelectedItemIndex(0);
}
}

_updateRemoveSourceButtonState() {
Expand Down

0 comments on commit 7b0c13a

Please sign in to comment.