Skip to content

Commit

Permalink
Merge branch '貢献者ガイドラインVOICEVOX#1190' of https://github.com/nmori/voi…
Browse files Browse the repository at this point in the history
…cevox into 貢献者ガイドラインVOICEVOX#1190
  • Loading branch information
nmori committed Feb 12, 2023
2 parents 205b1c8 + 3b632e7 commit e621935
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions src/components/DefaultStyleListDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,26 @@ watch([() => props.modelValue], async ([newValue]) => {
.filter(
(characterInfo) => characterInfo.metas.styles.length > 1
) as CharacterInfo[];
selectedStyleIndexes.value = Object.fromEntries([
...store.state.userCharacterOrder.map((speakerUuid) => [speakerUuid, 0]),
...store.state.defaultStyleIds.map((defaultStyle) => [
defaultStyle.speakerUuid,
characterInfosMap.value[
defaultStyle.speakerUuid
]?.metas.styles.findIndex(
(style) => style.styleId === defaultStyle.defaultStyleId
) ?? 0,
]),
]);
// FIXME: エンジン未起動状態でデフォルトスタイル選択ダイアログを開くと
// 未起動エンジンのキャラのデフォルトスタイルが消えてしまう
selectedStyleIndexes.value = Object.fromEntries(
[
...store.state.userCharacterOrder.map(
(speakerUuid) => [speakerUuid, 0] as const
),
...store.state.defaultStyleIds.map(
(defaultStyle) =>
[
defaultStyle.speakerUuid,
characterInfosMap.value[
defaultStyle.speakerUuid
]?.metas.styles.findIndex(
(style) => style.styleId === defaultStyle.defaultStyleId
),
] as const
),
].filter(([speakerUuid]) => speakerUuid in characterInfosMap.value)
);
}
});
Expand Down

0 comments on commit e621935

Please sign in to comment.