Commit 0391775f authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Meshing: Add lm parameter translate.

Showing with 23 additions and 3 deletions
+23 -3
......@@ -36,9 +36,10 @@ class MeshingDialog(PamhyrDialog):
_pamhyr_ui = "MeshingOptions"
_pamhyr_name = "Meshing"
def __init__(self, reach, parent=None):
def __init__(self, reach, trad=None, parent=None):
super(MeshingDialog, self).__init__(
title=self._pamhyr_name,
trad=trad,
options=[],
parent=parent
)
......@@ -66,8 +67,14 @@ class MeshingDialog(PamhyrDialog):
self._space_step
)
lm_dict = self._trad.get_dict("lm_dict")
self.combobox_add_items(
"comboBox_lm", ["1", "2", "3"]
"comboBox_lm", list(
map(
lambda x: lm_dict[x],
["1", "2", "3"]
)
)
)
self.set_combobox_text("comboBox_lm", self._lm)
......@@ -167,7 +174,8 @@ class MeshingDialog(PamhyrDialog):
self._begin_dir = self.get_combobox_text("comboBox_begin_gl")
self._end_dir = self.get_combobox_text("comboBox_end_gl")
self._lm = self.get_combobox_text("comboBox_lm")
r_lm_dict = self._trad.get_dict("r_lm_dict")
self._lm = r_lm_dict[self.get_combobox_text("comboBox_lm")]
super().accept()
......
......@@ -47,3 +47,14 @@ class GeometryTranslate(PamhyrTranslate):
"kp": _translate("Geometry", "KP (m)"),
"poins": _translate("Geometry", "Points"),
}
self._sub_dict["lm_dict"] = {
"1": _translate("Geometry", "First guideline"),
"2": _translate("Geometry", "Second guideline"),
"3": _translate("Geometry", "Means between the two guideline"),
}
self._sub_dict["r_lm_dict"] = {}
for k in self._sub_dict["lm_dict"]:
v = self._sub_dict["lm_dict"][k]
self._sub_dict["r_lm_dict"][v] = k
......@@ -263,6 +263,7 @@ class GeometryWindow(PamhyrWindow):
try:
dlg = MeshingDialog(
reach=self._reach,
trad=self._trad,
parent=self
)
if dlg.exec():
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment