ecere/gui/ListBox: Fixed moving rows updating with wrong index
[sdk] / ecere / src / gui / controls / ListBox.ec
index a3aa5d5..37cc0eb 100644 (file)
@@ -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