[gnome-subtitles] Fixed a bug inserting in the first position with other existing subtitles



commit 3ba3bf75dff1daae131d871d1fd44d25d9e1ad49
Author: Pedro Castro <mail pedrocastro org>
Date:   Wed Dec 29 04:22:02 2010 +0000

    Fixed a bug inserting in the first position with other existing subtitles

 src/GnomeSubtitles/Ui/View/Subtitles.cs |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/GnomeSubtitles/Ui/View/Subtitles.cs b/src/GnomeSubtitles/Ui/View/Subtitles.cs
index 1db7b18..c1bd71b 100644
--- a/src/GnomeSubtitles/Ui/View/Subtitles.cs
+++ b/src/GnomeSubtitles/Ui/View/Subtitles.cs
@@ -1,6 +1,6 @@
 /*
  * This file is part of Gnome Subtitles.
- * Copyright (C) 2006-2009 Pedro Castro
+ * Copyright (C) 2006-2010 Pedro Castro
  *
  * Gnome Subtitles is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -90,10 +90,7 @@ public class Subtitles : SubLib.Core.Domain.Subtitles {
 	public void AddNewAt (int index) {
 		Collection.AddNewAt(index, Properties);
 		Subtitle newSubtitle = this[index];
-		if (index == 0)
-			model.AppendValues(newSubtitle);
-		else
-			model.SetValue(model.Insert(index), 0, newSubtitle);
+		model.SetValue(model.Insert(index), 0, newSubtitle);
 	}
 	
 	/// <summary>Removes a subtitle from the collection, given its <see cref="TreePath" />.</summary>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]