tastudio: fix the warning about inheritance mismatch

This commit is contained in:
feos 2016-06-11 18:58:22 +03:00
parent 294654943b
commit cbc5ca2115
1 changed files with 21 additions and 3 deletions

View File

@ -109,7 +109,13 @@ namespace BizHawk.Client.Common
return sb.ToString();
}
public new void Add(TasMovieMarker item, bool fromHistory = false)
// the inherited one
public new void Add(TasMovieMarker item)
{
Add(item, false);
}
public void Add(TasMovieMarker item, bool fromHistory)
{
var existingItem = this.FirstOrDefault(m => m.Frame == item.Frame);
if (existingItem != null)
@ -148,7 +154,13 @@ namespace BizHawk.Client.Common
_movie.ChangeLog.EndBatch();
}
public new void Insert(int index, TasMovieMarker item, bool fromHistory = false)
// the inherited one
public new void Insert(int index, TasMovieMarker item)
{
Insert(index, item, false);
}
public void Insert(int index, TasMovieMarker item, bool fromHistory)
{
if (!fromHistory)
_movie.ChangeLog.AddMarkerChange(item);
@ -170,7 +182,13 @@ namespace BizHawk.Client.Common
OnListChanged(NotifyCollectionChangedAction.Add);
}
public new void Remove(TasMovieMarker item, bool fromHistory = false)
// the inherited one
public new void Remove(TasMovieMarker item)
{
Remove(item, false);
}
public void Remove(TasMovieMarker item, bool fromHistory)
{
if (item == null || item.Frame == 0) // TODO: Don't do this.
return;