From d86a133b9bd8793983725383cf12ca3aade80111 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 6 Sep 2013 16:50:40 +0000 Subject: [PATCH] better info messages for fields with more components/nodes that can be displayed --- Graphics/drawPost.cpp | 6 +++--- Post/PViewDataGModelIO.cpp | 4 ++-- Post/PViewVertexArrays.cpp | 11 ++++++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Graphics/drawPost.cpp b/Graphics/drawPost.cpp index 96b418b8d9..1f9da8c790 100644 --- a/Graphics/drawPost.cpp +++ b/Graphics/drawPost.cpp @@ -342,9 +342,9 @@ static void drawGlyphs(drawContext *ctx, PView *p) else{ if(numNodesError != numNodes){ numNodesError = numNodes; - Msg::Error("You should never draw views with > %d nodes per element: use" - "'Adapt visualization grid' to view high-order datasets!", - PVIEW_NMAX); + Msg::Warning("Fields with %d nodes per element cannot be displayed: " + "either force the field type or select 'Adapt visualization " + "grid' if the field is high-order", numNodes); } continue; } diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp index dbe8f67034..6efae75ded 100644 --- a/Post/PViewDataGModelIO.cpp +++ b/Post/PViewDataGModelIO.cpp @@ -425,8 +425,8 @@ bool PViewDataGModel::readMED(const std::string &fileName, int fileIndex) (numComp <= 1) ? 1 : (numComp <= 3) ? 3 : (numComp <= 9) ? 9 : numComp; if(numCompMsh > 9) - Msg::Warning("More than 9 components in field: you will probably want to force " - "the field type to scalar, vector or tensor in the options"); + Msg::Info("More than 9 components in field: you will probably want to force " + "the field type to scalar, vector or tensor in the options"); // Warning! The ordering of the elements in the last two lists is // important: it should match the ordering of the MSH element types diff --git a/Post/PViewVertexArrays.cpp b/Post/PViewVertexArrays.cpp index 25f5f553c6..f8a07be764 100644 --- a/Post/PViewVertexArrays.cpp +++ b/Post/PViewVertexArrays.cpp @@ -1213,9 +1213,9 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) else { if(numNodesError != numNodes){ numNodesError = numNodes; - Msg::Error("You should never draw views with > %d nodes per element: use" - "'Adapt visualization grid' to view high-order datasets!", - PVIEW_NMAX); + Msg::Warning("Fields with %d nodes per element cannot be displayed: " + "either force the field type or select 'Adapt visualization " + "grid' if the field is high-order", numNodes); } continue; } @@ -1223,8 +1223,9 @@ static void addElementsInArrays(PView *p, bool preprocessNormalsOnly) if((numComp > 9 && !opt->forceNumComponents) || opt->forceNumComponents > 9){ if(numCompError != numComp) { numCompError = numComp; - Msg::Error("You should never draw views with > 9 values per node: use" - "'Adapt visualization grid' to view high-order datasets!"); + Msg::Warning("Fields with %d components cannot be displayed: " + "either force the field type or select 'Adapt visualization " + "grid' if the field is high-order", numComp); } continue; } -- GitLab