diff --git a/src/components/Dialog/ImportSongProjectDialog.vue b/src/components/Dialog/ImportSongProjectDialog.vue
index a4d2eadd57..a52bee0cfa 100644
--- a/src/components/Dialog/ImportSongProjectDialog.vue
+++ b/src/components/Dialog/ImportSongProjectDialog.vue
@@ -40,10 +40,17 @@
>
+
@@ -110,6 +117,10 @@ const { dialogRef, onDialogOK, onDialogCancel } = useDialogPluginComponent();
const store = useStore();
const log = createLogger("ImportExternalProjectDialog");
+const multiTrackEnabled = computed(
+ () => store.state.experimentalSetting.enableMultiTrack,
+);
+
// 受け入れる拡張子
const acceptExtensions = computed(
() => supportedExtensions.map((ext) => `.${ext}`).join(",") + ",.vvproj",
@@ -232,6 +243,23 @@ const trackOptions = computed(() => {
});
// 選択中のトラック
const selectedTrackIndexes = ref(null);
+const selectedTrackIndex = computed({
+ get: () => {
+ if (selectedTrackIndexes.value == null) {
+ return null;
+ }
+ if (selectedTrackIndexes.value.length === 0) {
+ return null;
+ }
+ return selectedTrackIndexes.value[0];
+ },
+ set: (index: number | null) => {
+ if (index == null) {
+ throw new Error("assert: index != null");
+ }
+ selectedTrackIndexes.value = [index];
+ },
+});
// データ初期化
const initializeValues = () => {
diff --git a/src/components/Dialog/SettingDialog/SettingDialog.vue b/src/components/Dialog/SettingDialog/SettingDialog.vue
index 4b1677c0a4..d74ef2b31b 100644
--- a/src/components/Dialog/SettingDialog/SettingDialog.vue
+++ b/src/components/Dialog/SettingDialog/SettingDialog.vue
@@ -230,6 +230,7 @@
@@ -524,6 +525,17 @@
)
"
/>
+
+
+ 現在のプロジェクトに複数のトラックが存在するため、無効化できません。
+
+
@@ -896,6 +908,23 @@ const selectedEngineId = computed({
const renderEngineNameLabel = (engineId: EngineId) => {
return engineInfos.value[engineId].name;
};
+
+// トラックが複数あるときはマルチトラック機能を無効化できないようにする
+const canToggleMultiTrack = computed(() => {
+ if (!experimentalSetting.value.enableMultiTrack) {
+ return true;
+ }
+
+ return store.state.tracks.size <= 1;
+});
+
+const setMultiTrack = (enableMultiTrack: boolean) => {
+ changeExperimentalSetting("enableMultiTrack", enableMultiTrack);
+ // 無効化するときはUndo/Redoをクリアする
+ if (!enableMultiTrack) {
+ store.dispatch("CLEAR_UNDO_HISTORY");
+ }
+};