diff Framework/Scene2DViewport/LineMeasureTool.cpp @ 804:61ba4b504e9a

PolylineSceneLayer now has one color per chain
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 May 2019 15:58:21 +0200
parents 66ac7a2d1e3a
children e42b491f1fb2
line wrap: on
line diff
--- a/Framework/Scene2DViewport/LineMeasureTool.cpp	Tue May 28 14:18:46 2019 +0200
+++ b/Framework/Scene2DViewport/LineMeasureTool.cpp	Tue May 28 15:58:21 2019 +0200
@@ -107,16 +107,16 @@
 
           PolylineSceneLayer* polylineLayer = layerHolder_->GetPolylineLayer(0);
           polylineLayer->ClearAllChains();
-          polylineLayer->SetColor(
-            TOOL_LINES_COLOR_RED, 
-            TOOL_LINES_COLOR_GREEN, 
-            TOOL_LINES_COLOR_BLUE);
+
+          const Color color(TOOL_LINES_COLOR_RED, 
+                            TOOL_LINES_COLOR_GREEN, 
+                            TOOL_LINES_COLOR_BLUE);
 
           {
             PolylineSceneLayer::Chain chain;
             chain.push_back(start_);
             chain.push_back(end_);
-            polylineLayer->AddChain(chain, false);
+            polylineLayer->AddChain(chain, false, color);
           }
 
           // handles
@@ -128,7 +128,7 @@
               AddSquare(chain, GetScene(), start_, 
                 GetController()->GetHandleSideLengthS());
               
-              polylineLayer->AddChain(chain, true);
+              polylineLayer->AddChain(chain, true, color);
             }
 
             {
@@ -138,7 +138,7 @@
               AddSquare(chain, GetScene(), end_, 
                 GetController()->GetHandleSideLengthS());
               
-              polylineLayer->AddChain(chain, true);
+              polylineLayer->AddChain(chain, true, color);
             }
           }