From b286dfd55e86b7d8ee40bff423c21d58351b39dd Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 20 Sep 2007 10:03:48 +0000
Subject: [PATCH] compatibility fix: make arrows scale like in the old version

---
 Graphics/Post.cpp | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/Graphics/Post.cpp b/Graphics/Post.cpp
index 113de5f768..4c23b55bd8 100644
--- a/Graphics/Post.cpp
+++ b/Graphics/Post.cpp
@@ -1,4 +1,4 @@
-// $Id: Post.cpp,v 1.134 2007-09-18 16:26:02 geuzaine Exp $
+// $Id: Post.cpp,v 1.135 2007-09-20 10:03:48 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -981,7 +981,7 @@ void drawVectorArray(PView *p, VertexArray *va)
     glColor4ubv((GLubyte *)va->getColorArray(4 * i));
     double max;
     if(opt->ArrowSizeProportional)
-      max = p->getData()->getMax(opt->TimeStep);
+      max = opt->TmpMax;
     else
       max = sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
     if(max){
@@ -1291,6 +1291,19 @@ class drawPView {
       }
     }
 
+    if(opt->RangeType == PViewOptions::Custom){
+      opt->TmpMin = opt->CustomMin;
+      opt->TmpMax = opt->CustomMax;
+    }
+    else if(opt->RangeType == PViewOptions::PerTimeStep){
+      opt->TmpMin = data->getMin(opt->TimeStep);
+      opt->TmpMax = data->getMax(opt->TimeStep);
+    }
+    else{
+      opt->TmpMin = data->getMin();
+      opt->TmpMax = data->getMax();
+    }
+
     // draw all the vertex arrays
     drawArrays(p, p->va_points, GL_POINTS, false);
     drawArrays(p, p->va_lines, GL_LINES, opt->Light && opt->LightLines);
-- 
GitLab