From 78d143437669ee7593ab160aba4c35fc9c200d5e Mon Sep 17 00:00:00 2001 From: Boris Sedji <sedji.boris@hotmail.com> Date: Tue, 1 Jun 2010 09:45:36 +0000 Subject: [PATCH] numComp counting when default value (=-1) is used, has been lost since 7668 revision --- Post/PViewDataGModelIO.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp index 7aed6e2249..51119e9493 100644 --- a/Post/PViewDataGModelIO.cpp +++ b/Post/PViewDataGModelIO.cpp @@ -16,6 +16,13 @@ bool PViewDataGModel::addData(GModel *model, std::map<int, std::vector<double> > { if(data.empty()) return false; + if (numComp < 0){ + numComp = 9; + for(std::map<int, std::vector<double> >::iterator it = data.begin(); + it != data.end(); it++) + numComp = std::min(numComp, (int)it->second.size()); + } + while(step >= (int)_steps.size()) _steps.push_back(new stepData<double>(model, numComp)); -- GitLab