Subtitle & Comment editors - clear out old comments & subs before saving the new list

This commit is contained in:
andres.delikat 2011-07-04 13:37:51 +00:00
parent 88f14d07d8
commit b6bd94242f
4 changed files with 12 additions and 1 deletions

View File

@ -40,6 +40,7 @@ namespace BizHawk.MultiClient
{
if (!ReadOnly)
{
selectedMovie.ClearComments();
for (int x = 0; x < CommentGrid.Rows.Count - 1; x++)
{
DataGridViewCell c = CommentGrid.Rows[x].Cells[0];

View File

@ -47,7 +47,7 @@ namespace BizHawk.MultiClient
{
if (!ReadOnly)
{
//Save subtitles to movie object & write to disk
selectedMovie.Subtitles.ClearSubtitles();
for (int x = 0; x < SubGrid.Rows.Count - 1; x++)
{
Subtitle s = new Subtitle();

View File

@ -741,5 +741,10 @@ namespace BizHawk.MultiClient
{
Header.Comments.Add(comment);
}
public void ClearComments()
{
Header.Comments.Clear();
}
}
}

View File

@ -121,5 +121,10 @@ namespace BizHawk.MultiClient
{
subs.Add(s);
}
public void ClearSubtitles()
{
subs.Clear();
}
}
}