From f0aa7314107ced12b2d5dbfdcaa6a3fa38b02f87 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sat, 12 Oct 2013 20:17:29 +0000 Subject: [PATCH] warn if size of x and y series have different size --- Common/onelabUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Common/onelabUtils.cpp b/Common/onelabUtils.cpp index 54dad62fe9..5b44bcc989 100644 --- a/Common/onelabUtils.cpp +++ b/Common/onelabUtils.cpp @@ -262,6 +262,9 @@ namespace onelabUtils { for(unsigned int i = 0; i < y.size(); i++) x.push_back(i); } if(x.size() && y.size()){ + if(x.size() != y.size()) + Msg::Warning("X-Y data series have different length (%d != %d)", + (int)x.size(), (int)y.size()); if(view){ view->getData()->setXY(x, y); view->getData()->setName(yName); -- GitLab