diff --git a/src/Meshing/Internal.py b/src/Meshing/Internal.py index 016688ed..2eaebe12 100644 --- a/src/Meshing/Internal.py +++ b/src/Meshing/Internal.py @@ -47,6 +47,10 @@ class InternalMeshing(AMeshingTool): if profiles is None: return [] + for p in profiles: + if len(p) < 1: + return [] + guide_list = self.get_guide_list(reach, profiles) if guide_list is None: return [] diff --git a/src/View/BoundaryCondition/Edit/Table.py b/src/View/BoundaryCondition/Edit/Table.py index c0cfa1ed..8df696f0 100644 --- a/src/View/BoundaryCondition/Edit/Table.py +++ b/src/View/BoundaryCondition/Edit/Table.py @@ -58,7 +58,11 @@ logger = logging.getLogger() class TableModel(PamhyrTableModel): def get_true_data_row(self, row): - bc = self._data.data[row] + + if len(self._data.data) > 0: + bc = self._data.data[row] + else: + return 0 return next( map( diff --git a/src/View/Geometry/UndoCommand.py b/src/View/Geometry/UndoCommand.py index 3a5da35b..e0c4df6a 100644 --- a/src/View/Geometry/UndoCommand.py +++ b/src/View/Geometry/UndoCommand.py @@ -320,7 +320,7 @@ class MeshingCommand(QUndoCommand): for i in range(self._limites[1] - self._limites[0]): k += 1 for p in self._new_profiles[i]: - self._reach.insert_profile(k, p) + self._reach.insert_profile(k, p.cloned_for(self._reach)) k += 1 # Update selection