created songs appear in music info
This commit is contained in:
parent
b5d6746bf7
commit
9983bc2705
@ -109,6 +109,21 @@ namespace TaikoSoundEditor
|
||||
LoadedMusicBox.DataSource = LoadedMusicBinding;
|
||||
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;
|
||||
foreach (var musicOrder in MusicOrders.Items.Where(_ => MusicInfos.Items.Any(mi => mi.UniqueId == _.UniqueId)))
|
||||
|
@ -295,6 +295,15 @@ namespace TaikoSoundEditor
|
||||
|
||||
TabControl.SelectedIndex = 1;
|
||||
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);
|
||||
});
|
||||
|
||||
|
||||
|
12
MainForm.cs
12
MainForm.cs
@ -129,9 +129,18 @@ namespace TaikoSoundEditor
|
||||
if (NewSoundsBox.SelectedItem != null)
|
||||
{
|
||||
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");
|
||||
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;
|
||||
}
|
||||
|
||||
@ -172,6 +181,7 @@ namespace TaikoSoundEditor
|
||||
|
||||
Logger.Info("Removing from music orders");
|
||||
MusicOrderViewer.RemoveSong(mo);
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user