src/model.cpp

changeset 1369
1e2391b78d17
parent 1365
3f917410e977
child 1377
0b9a946002be
--- a/src/model.cpp	Sun Apr 01 15:32:30 2018 +0300
+++ b/src/model.cpp	Mon Apr 02 10:33:17 2018 +0300
@@ -175,9 +175,10 @@
 	if (index.isValid())
 	{
 		removeAt(index.row());
+		int position = index.row();
 
-		for (signed int i = countof(model.objects()) - 1; i >= 0; i -= 1)
-			insertCopy(index.row() + i, model.objects()[i]);
+		for (signed int i = 0; i < countof(model); i += 1)
+			insertCopy(position + i, model.objects()[i]);
 	}
 }
 

mercurial