From 595eb29c42bb321c05867d02a72f29906e379dce Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Mon, 20 Nov 2023 16:15:43 +0100
Subject: [PATCH] BC: Fix long type translate crash.

---
 src/View/BoundaryCondition/Table.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/View/BoundaryCondition/Table.py b/src/View/BoundaryCondition/Table.py
index 8aa1a343..0115b9e9 100644
--- a/src/View/BoundaryCondition/Table.py
+++ b/src/View/BoundaryCondition/Table.py
@@ -115,13 +115,14 @@ class ComboBoxDelegate(QItemDelegate):
 
 
 class TableModel(PamhyrTableModel):
-    def __init__(self, **kwargs):
-        super(TableModel, self).__init__(**kwargs)
-
+    def __init__(self, trad = None, **kwargs):
+        self._trad = trad
         self._long_types = {}
         if self._trad is not None:
             self._long_types = self._trad.get_dict("long_types")
 
+        super(TableModel, self).__init__(trad = trad, **kwargs)
+
     def _setup_lst(self):
         self._lst = self._data.boundary_condition
         self._tab = self._opt_data
-- 
GitLab