From f340465e52ac939899b751874505fd54c8c72eb3 Mon Sep 17 00:00:00 2001 From: Joey Kleingers Date: Thu, 21 Dec 2023 09:01:29 -0500 Subject: [PATCH] BUG FIX: All IDataCreationAction subclasses now correctly pass the geometry path member variable when being cloned. (#802) Signed-off-by: Joey Kleingers --- src/complex/Filter/Actions/CreateGeometry1DAction.hpp | 9 ++------- src/complex/Filter/Actions/CreateGeometry2DAction.hpp | 9 ++------- src/complex/Filter/Actions/CreateGeometry3DAction.hpp | 9 ++------- .../Filter/Actions/CreateRectGridGeometryAction.cpp | 10 ++-------- .../Filter/Actions/CreateVertexGeometryAction.hpp | 5 +---- 5 files changed, 9 insertions(+), 33 deletions(-) diff --git a/src/complex/Filter/Actions/CreateGeometry1DAction.hpp b/src/complex/Filter/Actions/CreateGeometry1DAction.hpp index 8dac33e41a..218c328c9a 100644 --- a/src/complex/Filter/Actions/CreateGeometry1DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry1DAction.hpp @@ -244,13 +244,8 @@ class CreateGeometry1DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry1DAction()); - action->m_NumEdges = m_NumEdges; - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_EdgeDataName = m_EdgeDataName; - action->m_SharedVerticesName = m_SharedVerticesName; - action->m_SharedEdgesName = m_SharedEdgesName; + auto action = + std::unique_ptr(new CreateGeometry1DAction(getCreatedPath(), m_NumEdges, m_NumVertices, m_VertexDataName, m_EdgeDataName, m_SharedVerticesName, m_SharedEdgesName)); action->m_InputVertices = m_InputVertices; action->m_InputEdges = m_InputEdges; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateGeometry2DAction.hpp b/src/complex/Filter/Actions/CreateGeometry2DAction.hpp index d8a91751d5..9fb181a4fa 100644 --- a/src/complex/Filter/Actions/CreateGeometry2DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry2DAction.hpp @@ -244,13 +244,8 @@ class CreateGeometry2DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry2DAction()); - action->m_NumFaces = m_NumFaces; - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_FaceDataName = m_FaceDataName; - action->m_SharedVerticesName = m_SharedVerticesName; - action->m_SharedFacesName = m_SharedFacesName; + auto action = + std::unique_ptr(new CreateGeometry2DAction(getCreatedPath(), m_NumFaces, m_NumVertices, m_VertexDataName, m_FaceDataName, m_SharedVerticesName, m_SharedFacesName)); action->m_InputVertices = m_InputVertices; action->m_InputFaces = m_InputFaces; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateGeometry3DAction.hpp b/src/complex/Filter/Actions/CreateGeometry3DAction.hpp index 94a2b1a88a..d3c6efcf6f 100644 --- a/src/complex/Filter/Actions/CreateGeometry3DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry3DAction.hpp @@ -243,13 +243,8 @@ class CreateGeometry3DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry3DAction()); - action->m_NumCells = m_NumCells; - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_CellDataName = m_CellDataName; - action->m_SharedVerticesName = m_SharedVerticesName; - action->m_SharedCellsName = m_SharedCellsName; + auto action = + std::unique_ptr(new CreateGeometry3DAction(getCreatedPath(), m_NumCells, m_NumVertices, m_VertexDataName, m_CellDataName, m_SharedVerticesName, m_SharedCellsName)); action->m_InputVertices = m_InputVertices; action->m_InputCells = m_InputCells; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp b/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp index 163708d775..6e91eb89ee 100644 --- a/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp +++ b/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp @@ -174,14 +174,8 @@ Result<> CreateRectGridGeometryAction::apply(DataStructure& dataStructure, Mode IDataAction::UniquePointer CreateRectGridGeometryAction::clone() const { - auto action = std::unique_ptr(new CreateRectGridGeometryAction()); - action->m_NumXBoundTuples = m_NumXBoundTuples; - action->m_NumYBoundTuples = m_NumYBoundTuples; - action->m_NumZBoundTuples = m_NumZBoundTuples; - action->m_CellDataName = m_CellDataName; - action->m_XBoundsArrayName = m_XBoundsArrayName; - action->m_YBoundsArrayName = m_YBoundsArrayName; - action->m_ZBoundsArrayName = m_ZBoundsArrayName; + auto action = std::unique_ptr( + new CreateRectGridGeometryAction(getCreatedPath(), m_NumXBoundTuples, m_NumYBoundTuples, m_NumZBoundTuples, m_CellDataName, m_XBoundsArrayName, m_YBoundsArrayName, m_ZBoundsArrayName)); action->m_InputXBounds = m_InputXBounds; action->m_InputYBounds = m_InputYBounds; action->m_InputZBounds = m_InputZBounds; diff --git a/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp b/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp index 2182c17934..1e99748986 100644 --- a/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp +++ b/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp @@ -179,10 +179,7 @@ class CreateVertexGeometryAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateVertexGeometryAction()); - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_SharedVertexListName = m_SharedVertexListName; + auto action = std::unique_ptr(new CreateVertexGeometryAction(getCreatedPath(), m_NumVertices, m_VertexDataName, m_SharedVertexListName)); action->m_InputVertices = m_InputVertices; action->m_ArrayHandlingType = m_ArrayHandlingType; return action;