fixed removing objects causing some other objects to disappear

Sun, 11 Mar 2018 23:42:03 +0200

author
Santeri Piippo
date
Sun, 11 Mar 2018 23:42:03 +0200
changeset 1282
c6bc95cbf4a3
parent 1281
f9c01b455594
child 1283
3c3a5eb965f7

fixed removing objects causing some other objects to disappear

src/glcompiler.cpp file | annotate | diff | comparison | revisions
--- a/src/glcompiler.cpp	Sun Mar 11 16:13:32 2018 +0200
+++ b/src/glcompiler.cpp	Sun Mar 11 23:42:03 2018 +0200
@@ -500,12 +500,16 @@
 		m_staged.insert(m_renderer->model()->index(row));
 }
 
-void GLCompiler::handleRowRemoval(const QModelIndex&, int first, int last)
+void GLCompiler::handleRowRemoval(const QModelIndex&, int, int)
 {
-	for (int row = first; row <= last; row += 1)
+	// It looks like removing rows causes some key invalidation. Until I can figure that out,
+	// we're going scorched earth.
+	m_objectInfo.clear();
+	recompile();
+	/*
+	for (int row = last; row >= first; row -= 1)
 		forgetObject(m_renderer->model()->index(row));
-
-	needMerge();
+	*/
 }
 
 void GLCompiler::handleDataChange(const QModelIndex& topLeft, const QModelIndex& bottomRight)

mercurial