created songs appear in music info
This commit is contained in:
parent
b5d6746bf7
commit
9983bc2705
@ -109,6 +109,21 @@ namespace TaikoSoundEditor
|
|||||||
LoadedMusicBox.DataSource = LoadedMusicBinding;
|
LoadedMusicBox.DataSource = LoadedMusicBinding;
|
||||||
TabControl.SelectedIndex = 1;
|
TabControl.SelectedIndex = 1;
|
||||||
|
|
||||||
|
WordList.Items.RemoveAll(w =>
|
||||||
|
{
|
||||||
|
var key = w.Key;
|
||||||
|
|
||||||
|
var prefixes = new string[] { "song_sub_", "song_detail_", "song_" };
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++)
|
||||||
|
if (key.StartsWith(prefixes[i]))
|
||||||
|
{
|
||||||
|
key = key.Substring(prefixes[i].Length);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return !MusicInfos.Items.Any(mi => mi.Id == key);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
MusicOrderViewer.WordList = WordList;
|
MusicOrderViewer.WordList = WordList;
|
||||||
foreach (var musicOrder in MusicOrders.Items.Where(_ => MusicInfos.Items.Any(mi => mi.UniqueId == _.UniqueId)))
|
foreach (var musicOrder in MusicOrders.Items.Where(_ => MusicInfos.Items.Any(mi => mi.UniqueId == _.UniqueId)))
|
||||||
|
@ -295,7 +295,16 @@ namespace TaikoSoundEditor
|
|||||||
|
|
||||||
TabControl.SelectedIndex = 1;
|
TabControl.SelectedIndex = 1;
|
||||||
FeedbackBox.Clear();
|
FeedbackBox.Clear();
|
||||||
});
|
|
||||||
|
Logger.Info("Adding to music orders");
|
||||||
|
|
||||||
|
WordList.Items.Add(ns.Word);
|
||||||
|
WordList.Items.Add(ns.WordDetail);
|
||||||
|
WordList.Items.Add(ns.WordSub);
|
||||||
|
MusicAttributes.Items.Add(ns.MusicAttribute);
|
||||||
|
|
||||||
|
MusicOrderViewer.AddSong(mo);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
private static void CreateTmpDir()
|
private static void CreateTmpDir()
|
||||||
|
14
MainForm.cs
14
MainForm.cs
@ -129,9 +129,18 @@ namespace TaikoSoundEditor
|
|||||||
if (NewSoundsBox.SelectedItem != null)
|
if (NewSoundsBox.SelectedItem != null)
|
||||||
{
|
{
|
||||||
Logger.Info("Removing newly added song");
|
Logger.Info("Removing newly added song");
|
||||||
AddedMusic.Remove(NewSoundsBox.SelectedItem as NewSongData);
|
var ns = NewSoundsBox.SelectedItem as NewSongData;
|
||||||
|
AddedMusic.Remove(ns);
|
||||||
Logger.Info("Refreshing list");
|
Logger.Info("Refreshing list");
|
||||||
AddedMusicBinding.ResetBindings(false);
|
AddedMusicBinding.ResetBindings(false);
|
||||||
|
MusicOrderViewer.RemoveSong(ns.MusicOrder);
|
||||||
|
|
||||||
|
Logger.Info("Removing from wordlist & music_attributes");
|
||||||
|
WordList.Items.Remove(ns.Word);
|
||||||
|
WordList.Items.Remove(ns.WordDetail);
|
||||||
|
WordList.Items.Remove(ns.WordSub);
|
||||||
|
MusicAttributes.Items.Remove(ns.MusicAttribute);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +180,8 @@ namespace TaikoSoundEditor
|
|||||||
LoadedMusicBox.SelectedIndex = sel;
|
LoadedMusicBox.SelectedIndex = sel;
|
||||||
|
|
||||||
Logger.Info("Removing from music orders");
|
Logger.Info("Removing from music orders");
|
||||||
MusicOrderViewer.RemoveSong(mo);
|
MusicOrderViewer.RemoveSong(mo);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user