[tasque/transition: 111/213] Fix GetItemIndex
- From: Antonius Riha <antoniusri src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tasque/transition: 111/213] Fix GetItemIndex
- Date: Wed, 29 Aug 2012 18:43:21 +0000 (UTC)
commit b4b1c9fb73dd2301d92d43d405bcec27dffa7678
Author: Antonius Riha <antoniusriha gmail com>
Date: Thu Aug 16 13:58:50 2012 +0200
Fix GetItemIndex
Move operation fails if index counter increments when moving item compares itself
src/libtasque/SortedNotifyCollection.cs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libtasque/SortedNotifyCollection.cs b/src/libtasque/SortedNotifyCollection.cs
index bc146e3..c922f46 100644
--- a/src/libtasque/SortedNotifyCollection.cs
+++ b/src/libtasque/SortedNotifyCollection.cs
@@ -132,7 +132,8 @@ namespace Tasque
foreach (var i in items) {
if (item.CompareTo (i) == -1)
break;
- index++;
+ if (!Equals (item, i))
+ index++;
}
return index;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]