1
0
mirror of synced 2024-11-13 16:40:46 +01:00

more fixes

This commit is contained in:
NotImplementedLife 2023-07-30 09:51:24 +03:00
parent abc76f1288
commit 129454ff78
2 changed files with 36 additions and 1 deletions

View File

@ -104,14 +104,47 @@ namespace TaikoSoundEditor
foreach (var mi in MusicInfos.Items)
{
if (mi.UniqueId == 0) continue;
var songId = mi.Id;
if(MusicAttributes.GetByUniqueId(mi.UniqueId)==null)
{
Logger.Info($"Added missing music_attribute entry for {mi.UniqueId}.{songId}");
MusicAttributes.Items.Add(new MusicAttribute
{
Id = songId,
UniqueId = mi.UniqueId,
New = false
});
}
if(MusicOrders.GetByUniqueId(mi.UniqueId)==null)
{
Logger.Info($"Added missing music_order entry for {mi.UniqueId}.{songId}");
MusicOrders.Items.Add(new MusicOrder
{
Genre = mi.Genre,
Id = songId,
UniqueId = mi.UniqueId
});
}
if (WordList.GetBySong(songId) == null)
{
Logger.Info($"Added missing word title entry for {mi.UniqueId}.{songId}");
WordList.Items.Add(new Word { Key = $"song_{songId}", JapaneseText = "" });
}
if (WordList.GetBySongSub(songId) == null)
{
Logger.Info($"Added missing word subtitle entry for {mi.UniqueId}.{songId}");
WordList.Items.Add(new Word { Key = $"song_sub_{songId}", JapaneseText = "" });
}
if (WordList.GetBySongDetail(songId) == null)
WordList.Items.Add(new Word { Key = $"song_detail_{songId}", JapaneseText = "" });
{
Logger.Info($"Added missing word detail entry for {mi.UniqueId}.{songId}");
WordList.Items.Add(new Word { Key = $"song_detail_{songId}", JapaneseText = "" });
}
}
Logger.Info($"Setting LoadedMusicBox DataSource");

View File

@ -105,6 +105,7 @@ namespace TaikoSoundEditor
Logger.Info($"Selection Changed MusicItem: {item}");
LoadMusicInfo(item);
indexChanging = false;
SoundViewTab.SelectedTab = SoundViewerSimple;
});
private void EditorTable_Resize(object sender, EventArgs e) => ExceptionGuard.Run(() =>
@ -119,6 +120,7 @@ namespace TaikoSoundEditor
LoadedMusicBox.SelectedItem = null;
var item = NewSoundsBox.SelectedItem as NewSongData;
LoadNewSongData(item);
SoundViewTab.SelectedTab = SoundViewerSimple;
});
#endregion