From 13778e1d306926071d9f3e881a9a00a9e862a1a1 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 7 May 2021 10:58:23 -0700 Subject: [PATCH] pygui: updated emane config dialog to sort emane models consistently --- daemon/core/gui/dialogs/emaneconfig.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/core/gui/dialogs/emaneconfig.py b/daemon/core/gui/dialogs/emaneconfig.py index ea7f5624..ef446a62 100644 --- a/daemon/core/gui/dialogs/emaneconfig.py +++ b/daemon/core/gui/dialogs/emaneconfig.py @@ -114,10 +114,11 @@ class EmaneConfigDialog(Dialog): self.node: Node = node self.radiovar: tk.IntVar = tk.IntVar() self.radiovar.set(1) + self.emane_models: List[str] = [ - x.split("_")[1] for x in self.app.core.emane_models + x.split("_")[1] for x in sorted(self.app.core.emane_models) ] - model = self.node.emane.split("_")[1] + model = self.emane_models[0] self.emane_model: tk.StringVar = tk.StringVar(value=model) self.emane_model_button: Optional[ttk.Button] = None self.enabled: bool = not self.app.core.is_runtime()