src/mainwindow.cpp

changeset 1258
f5921a474d57
parent 1257
0d42a1ebd954
child 1283
3c3a5eb965f7
--- a/src/mainwindow.cpp	Sat Mar 03 15:14:07 2018 +0200
+++ b/src/mainwindow.cpp	Sat Mar 03 16:53:56 2018 +0200
@@ -379,8 +379,8 @@
 {
 	// If we have a selection, put the item after it.
 	// TODO: fix this properly!
-	if (not selectedObjects().isEmpty())
-		return (*(selectedObjects().end() - 1))->lineNumber() + 1;
+	if (not selectedIndexes().isEmpty())
+		return (*(selectedIndexes().end() - 1)).row() + 1;
 
 	// Otherwise place the object at the end.
 	return m_currentDocument->size();

mercurial