src/glcompiler.cpp

changeset 1278
6e1ea24e5a5e
parent 1276
cae7b4f660c5
child 1282
c6bc95cbf4a3
--- a/src/glcompiler.cpp	Wed Mar 07 19:32:05 2018 +0200
+++ b/src/glcompiler.cpp	Thu Mar 08 11:36:55 2018 +0200
@@ -168,8 +168,8 @@
 		return {208, 64, 64};
 
 	case VboSubclass::PickColors:
-		// For the picking scene, determine the color from the owner's ID.
-		return indexColorForID(polygonOwner->id());
+		// For the picking scene, use unique picking colors provided by the model.
+		return m_renderer->model()->pickingColorForObject(polygonOwnerIndex);
 
 	case VboSubclass::RandomColors:
 		// For the random color scene, the owner object has rolled up a random color. Use that.
@@ -366,7 +366,6 @@
 	case LDObjectType::ConditionalEdge:
 		{
 			LDPolygon* poly = object->getPolygon();
-			poly->id = object->id();
 			compilePolygon (*poly, index, info);
 			delete poly;
 			break;
@@ -379,10 +378,7 @@
 			auto data = subfileReference->inlinePolygons(m_documents);
 
 			for (LDPolygon& poly : data)
-			{
-				poly.id = object->id();
 				compilePolygon (poly, index, info);
-			}
 			break;
 		}
 
@@ -390,10 +386,7 @@
 		{
 			LDBezierCurve* curve = static_cast<LDBezierCurve*>(object);
 			for (LDPolygon& polygon : curve->rasterizePolygons(grid()->bezierCurveSegments()))
-			{
-				polygon.id = object->id();
 				compilePolygon (polygon, index, info);
-			}
 		}
 		break;
 

mercurial