From 8e3ab01e9536261c8852aad54226aeef69a05f01 Mon Sep 17 00:00:00 2001 From: mhby1g21 <mhby1g21@soton.ac.uk> Date: Wed, 30 Oct 2024 18:00:38 +0000 Subject: [PATCH] fixed include top tickbox --- scripts/debug_tool/tabs/edge_net_tab.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/scripts/debug_tool/tabs/edge_net_tab.py b/scripts/debug_tool/tabs/edge_net_tab.py index b626af8..dc888be 100644 --- a/scripts/debug_tool/tabs/edge_net_tab.py +++ b/scripts/debug_tool/tabs/edge_net_tab.py @@ -270,7 +270,9 @@ class EdgeNetTab(QWidget): def on_include_top_changed(self, state): """Handle include top checkbox change""" - self.include_top = state == Qt.CheckState.Checked + # In PyQt6, CheckState.Checked has value 2 + self.include_top = (state == 2) # or state == Qt.CheckState.Checked + self.update_status(f"Include top changed to: {self.include_top}") def verify_inputs(self): """Verify input files exist""" @@ -319,10 +321,22 @@ class EdgeNetTab(QWidget): def _build_infer_command(self): """Build infer360.py command""" - include_top = "--include_top y" if self.include_top else "" - return (f'wsl bash -c "source {self.config_reader.config["wslAnacondaDir"]}/activate' - f' {self.config_reader.config["edgeNetEnv"]} && ' - f'python infer360.py Input enhanced_depth_e.png material.png rgb.png Input {include_top}"') + # Debug print to verify include_top state + self.update_status(f"Current include_top state: {self.include_top}") + + base_cmd = (f'wsl bash -c "source {self.config_reader.config["wslAnacondaDir"]}/activate' + f' {self.config_reader.config["edgeNetEnv"]} && ' + f'python infer360.py Input enhanced_depth_e.png material.png rgb.png Input') + + if self.include_top: + command = base_cmd + ' --include_top y"' + else: + command = base_cmd + '"' + + # Log final command + self.update_status(f"Final command: {command}") + + return command def on_edge_net_complete(self, success, error_message): """Handle EdgeNet completion""" -- GitLab