- cut unnecessary code from MainWindow::updateSelection. speeds it up a bit, especially when unselecting but it's not fast enough to my tastes yet

Wed, 30 Apr 2014 03:41:23 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Wed, 30 Apr 2014 03:41:23 +0300
changeset 758
bb897dfef387
parent 757
8ab9fa53142b
child 759
038985b4a154

- cut unnecessary code from MainWindow::updateSelection. speeds it up a bit, especially when unselecting but it's not fast enough to my tastes yet

src/mainWindow.cc file | annotate | diff | comparison | revisions
--- a/src/mainWindow.cc	Tue Apr 29 02:06:09 2014 +0300
+++ b/src/mainWindow.cc	Wed Apr 30 03:41:23 2014 +0300
@@ -455,12 +455,6 @@
 	if (g_isSelectionLocked == true || getCurrentDocument() == null)
 		return;
 
-	// Update the shared selection array, though don't do this if this was
-	// called during GL picking, in which case the GL renderer takes care
-	// of the selection.
-	if (m_renderer->isPicking())
-		return;
-
 	LDObjectList priorSelection = selection();
 
 	// Get the objects from the object list selection
@@ -484,9 +478,9 @@
 	removeDuplicates (compound);
 
 	for (LDObject* obj : compound)
-		m_renderer->compileObject (obj);
+		R()->compileObject (obj);
 
-	m_renderer->update();
+	R()->update();
 }
 
 // =============================================================================
@@ -565,9 +559,6 @@
 {
 	g_isSelectionLocked = true;
 
-	for (LDObject* obj : getCurrentDocument()->objects())
-		obj->setSelected (false);
-
 	ui->objectList->clearSelection();
 
 	for (LDObject* obj : selection())
@@ -576,11 +567,9 @@
 			continue;
 
 		obj->qObjListEntry->setSelected (true);
-		obj->setSelected (true);
 	}
 
 	g_isSelectionLocked = false;
-	slot_selectionChanged();
 }
 
 // =============================================================================

mercurial