src/toolsets/basictoolset.cpp

changeset 1258
f5921a474d57
parent 1257
0d42a1ebd954
child 1261
5d2c9d36da9d
--- a/src/toolsets/basictoolset.cpp	Sat Mar 03 15:14:07 2018 +0200
+++ b/src/toolsets/basictoolset.cpp	Sat Mar 03 16:53:56 2018 +0200
@@ -98,7 +98,7 @@
 	{
 		// Get the index of the subfile so we know where to insert the
 		// inlined contents.
-		QPersistentModelIndex referenceIndex = currentDocument()->index(reference->lineNumber());
+		QPersistentModelIndex referenceIndex = currentDocument()->indexOf(reference);
 		int row = referenceIndex.row();
 
 		if (referenceIndex.isValid())

mercurial