ecere/gui/ListBox: Fixed moving rows updating with wrong index
[sdk] / ecere / src / gui / controls / ListBox.ec
index 7c0de7b..37cc0eb 100644 (file)
@@ -401,7 +401,7 @@ public:
 #endif
             }
 
-            if(value.IsExpanded(this))
+            if(value.IsExpanded())
             {
                DataRow search;
 
@@ -522,10 +522,8 @@ public:
             {
                DataRow nextRow = GetNextRow();
                if(this == listBox.firstRowShown)
-               {
                   listBox.firstRowShown = nextRow;
-                  index = after ? (after.index + 1) : 0;
-               }
+               index = after.index;
 
                // All rows between ROW (exclusive) and AFTER (inclusive) are decremented by one
                // ROW is equal to AFTER's index
@@ -709,7 +707,7 @@ public:
                }
             }
 
-            if(IsExpanded(this))
+            if(IsExpanded())
             {
                DataRow search;