to fix mass zero

This commit is contained in:
Youcef AOUAD committed 2024-11-27 14:50:44 +01:00
1 parent 4383599d30
commit 49aab685fb
7 files changed
+27 -10

No files matched your search

+8 -3
View File
@@ -24,7 +24,7 @@ _translate = QCoreApplication.translate
class ResultsTranslate(MainTranslate):
def __init__(self, pollutants=None):
def __init__(self, pollutants=None, type_pol=None):
if pollutants is not None:
self.pollutants = pollutants
if "total_sediment" in self.pollutants:
@@ -32,6 +32,8 @@ class ResultsTranslate(MainTranslate):
else:
self.pollutants = pollutants
self._type_pol = type_pol
super(ResultsTranslate, self).__init__()
self._dict["Results"] = _translate("Results", "Results")
@@ -103,8 +105,11 @@ class ResultsTranslate(MainTranslate):
"name": _translate("Results", "Profile"),
}
for pol in self.pollutants:
self._sub_dict["table_headers_raw_data"][pol + " Concentration"] = pol + "\n Concentration"
self._sub_dict["table_headers_raw_data"][pol + " Mass"] = pol + "\n Mass"
if self._type_pol == 7:
self._sub_dict["table_headers_raw_data"][pol + " Concentration"] = pol + "\n Concentration"
self._sub_dict["table_headers_raw_data"][pol + " Mass"] = pol + "\n Mass"
else:
self._sub_dict["table_headers_raw_data"][pol + " Concentration"] = pol + "\n Concentration"
else:
self._sub_dict["table_headers_raw_data"] = {
"name": _translate("Results", "Profile"),