Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2014-06-21 14:50:28 +0400
committerAlexander Köplinger <alex.koeplinger@outlook.com>2014-06-21 18:37:34 +0400
commit4b50211fb7f1dd2621673edd100f30eb39098d7d (patch)
treeb8b891dcb4a5111b135a48693329b656faec6a57 /mcs/class/Managed.Windows.Forms/System.Windows.Forms
parentf2261b678620336fe57dda9f1c890e53d4d09854 (diff)
[Managed.Windows.Forms] Revert a revert commit that accidentally changed the wrong code
When the commit 8334fe3a56c978ffe7f8cb199536f9b3234afdbe was reverted in a791cfc1640bec442757f78fe71e428d643e90ed, accidentally the wrong chunk of code was changed. This commit reverts the changes correctly.
Diffstat (limited to 'mcs/class/Managed.Windows.Forms/System.Windows.Forms')
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs
index 277e71c9c6b..e69308f62f3 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs
@@ -390,7 +390,8 @@ namespace System.Windows.Forms {
else if (e.NewIndex <= listposition) {
/* the deleted row was either the current one, or one earlier in the list.
Update the index and emit PositionChanged, CurrentChanged, and ItemChanged. */
- ChangeRecordState (listposition+1,
+ // FIXME: this looks wrong, shouldn't it be (listposition - 1) instead of e.NewIndex ?
+ ChangeRecordState (e.NewIndex,
false, false, e.NewIndex != listposition, false);
}
else {
@@ -412,7 +413,7 @@ namespace System.Windows.Forms {
}
else {
if (e.NewIndex <= listposition) {
- ChangeRecordState (e.NewIndex,
+ ChangeRecordState (listposition + 1,
false, false, false, false);
OnItemChanged (new ItemChangedEventArgs (-1));
OnListChanged (e);