From 984d28275b5c287cfdbf1db10c3de11df9db19ac Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Tue, 13 Apr 2021 21:53:50 -0700 Subject: [PATCH 1/4] pygui: fixed issue with saving services for custom nodes, fixed issue with setting default services present when selecting services for a custom node --- daemon/core/gui/dialogs/customnodes.py | 14 +++++++------- daemon/core/gui/nodeutils.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/daemon/core/gui/dialogs/customnodes.py b/daemon/core/gui/dialogs/customnodes.py index 504731f1..d10bf30c 100644 --- a/daemon/core/gui/dialogs/customnodes.py +++ b/daemon/core/gui/dialogs/customnodes.py @@ -76,9 +76,9 @@ def draw(self) -> None: button.grid(row=0, column=1, sticky=tk.EW) # trigger group change - self.groups.listbox.event_generate("<>") + self.handle_group_change() - def handle_group_change(self, event: tk.Event) -> None: + def handle_group_change(self, event: tk.Event = None) -> None: selection = self.groups.listbox.curselection() if selection: index = selection[0] @@ -195,7 +195,7 @@ def click_icon(self) -> None: self.image_button.config(image=self.image) def click_services(self) -> None: - dialog = ServicesSelectDialog(self, self.app, self.services) + dialog = ServicesSelectDialog(self, self.app, set(self.services)) dialog.show() if dialog.current_services is not None: self.services.clear() @@ -238,12 +238,12 @@ def click_edit(self) -> None: node_draw.model = name node_draw.image_file = str(Path(self.image_file).absolute()) node_draw.image = self.image - node_draw.services = self.services + node_draw.services = set(self.services) logging.debug( "edit custom node (%s), image: (%s), services (%s)", - name, - self.image_file, - self.services, + node_draw.model, + node_draw.image_file, + node_draw.services, ) self.app.core.custom_nodes[name] = node_draw self.nodes_list.listbox.delete(self.selected_index) diff --git a/daemon/core/gui/nodeutils.py b/daemon/core/gui/nodeutils.py index c128461e..251ed275 100644 --- a/daemon/core/gui/nodeutils.py +++ b/daemon/core/gui/nodeutils.py @@ -172,7 +172,7 @@ def from_custom(cls, custom_node: CustomNode) -> "NodeDraw": node_draw.image_file = custom_node.image node_draw.image = images.from_file(custom_node.image, width=images.NODE_SIZE) node_draw.node_type = NodeType.DEFAULT - node_draw.services = custom_node.services + node_draw.services = set(custom_node.services) node_draw.label = custom_node.name node_draw.model = custom_node.name node_draw.tooltip = custom_node.name From 6ce4b425f8bb5b83b0eaadf56b2417e52a1461cf Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Thu, 15 Apr 2021 21:46:55 -0700 Subject: [PATCH 2/4] doc: add note to upgrade pip before installing --- docs/install.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/install.md b/docs/install.md index 7c5ebb84..5c66f420 100644 --- a/docs/install.md +++ b/docs/install.md @@ -134,6 +134,9 @@ After installation has completed you should be able to run `core-daemon` and `co `install.sh` will attempt to determine your OS by way of `/etc/os-release`, currently it supports attempts to install OSs that are debian/redhat like (yum/apt). ```shell +# make sure pip is the latest version before moving forward +python3 -m pip install -U pip + # clone CORE repo git clone https://github.com/coreemu/core.git cd core From 21749502f964f1d9b9059f352303d726c65030a3 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Thu, 15 Apr 2021 21:49:30 -0700 Subject: [PATCH 3/4] bumped version --- configure.ac | 2 +- daemon/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 78f5d42a..3fd076b6 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. # this defines the CORE version number, must be static for AC_INIT -AC_INIT(core, 7.5.0) +AC_INIT(core, 7.5.1) # autoconf and automake initialization AC_CONFIG_SRCDIR([netns/version.h.in]) diff --git a/daemon/pyproject.toml b/daemon/pyproject.toml index a874c5c8..a7e9c1d2 100644 --- a/daemon/pyproject.toml +++ b/daemon/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "core" -version = "7.5.0" +version = "7.5.1" description = "CORE Common Open Research Emulator" authors = ["Boeing Research and Technology"] license = "BSD-2-Clause" From 1daf5778c0d8337b51196d62722b975056deedae Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Thu, 15 Apr 2021 21:56:14 -0700 Subject: [PATCH 4/4] updated changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2344585d..b2659984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2021-04-15 CORE 7.5.1 + +* core-pygui + * fixed issues creating and drawing custom nodes + ## 2021-03-11 CORE 7.5.0 * core-daemon