]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #26351: backporting of Threshold auto-convert properties
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 13 Sep 2021 13:38:49 +0000 (15:38 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 13 Sep 2021 13:38:49 +0000 (15:38 +0200)
products/patches/paraview.0018-spns-26351-autoconvert.patch [new file with mode: 0644]

diff --git a/products/patches/paraview.0018-spns-26351-autoconvert.patch b/products/patches/paraview.0018-spns-26351-autoconvert.patch
new file mode 100644 (file)
index 0000000..997960f
--- /dev/null
@@ -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)