From 34d66b5f073f1578e7457d62f78f460c17703162 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Mon, 13 Sep 2021 15:38:49 +0200 Subject: [PATCH] spns #26351: backporting of Threshold auto-convert properties --- ...paraview.0018-spns-26351-autoconvert.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 products/patches/paraview.0018-spns-26351-autoconvert.patch diff --git a/products/patches/paraview.0018-spns-26351-autoconvert.patch b/products/patches/paraview.0018-spns-26351-autoconvert.patch new file mode 100644 index 0000000..997960f --- /dev/null +++ b/products/patches/paraview.0018-spns-26351-autoconvert.patch @@ -0,0 +1,34 @@ +--- ParaView.orig/Remoting/ServerManager/vtkSMInputArrayDomain.cxx 2021-09-09 08:57:14.769827497 +0200 ++++ ParaView/Remoting/ServerManager/vtkSMInputArrayDomain.cxx 2021-09-07 13:23:51.029276211 +0200 +@@ -144,26 +144,15 @@ + *acceptable_as_type = attribute_type; + } + +- if (required_type == ANY) ++ if (required_type == ANY_EXCEPT_FIELD && attribute_type == FIELD) + { +- return attribute_type == POINT || attribute_type == CELL || attribute_type == FIELD || +- attribute_type == EDGE || attribute_type == VERTEX || attribute_type == ROW; ++ return false; + } + +- if (required_type == ANY_EXCEPT_FIELD) ++ if (required_type == ANY || required_type == ANY_EXCEPT_FIELD) + { +- // Try out all attribute types except field data sequentially. +- int attribute_types_to_try[] = { vtkDataObject::POINT, vtkDataObject::CELL, +- vtkDataObject::VERTEX, vtkDataObject::EDGE, vtkDataObject::ROW, -1 }; +- for (int cc = 0; attribute_types_to_try[cc] != -1; ++cc) +- { +- if (vtkSMInputArrayDomain::IsAttributeTypeAcceptable( +- attribute_types_to_try[cc], attribute_type, acceptable_as_type)) +- { +- return true; +- } +- } +- return false; ++ return attribute_type == POINT || attribute_type == CELL || attribute_type == FIELD || ++ attribute_type == EDGE || attribute_type == VERTEX || attribute_type == ROW; + } + + switch (attribute_type) -- 2.39.2