From fb522d2473b8ba3d90a9dd2df7f32737a8efdd03 Mon Sep 17 00:00:00 2001 From: Peter Albrecht <albrecpe@gmail.com> Date: Sat, 20 Jan 2024 22:40:08 +0100 Subject: [PATCH] Removed automatic update of skill details --- source/RobotAPI/libraries/skills_gui/SkillMemoryGui.cpp | 4 ++++ .../skills_gui/skill_details/SkillDetailsTreeWidget.cpp | 5 ++++- .../libraries/skills_gui/skills/SkillTreeWidget.cpp | 6 ------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/RobotAPI/libraries/skills_gui/SkillMemoryGui.cpp b/source/RobotAPI/libraries/skills_gui/SkillMemoryGui.cpp index d71d5c269..4d74cf11e 100644 --- a/source/RobotAPI/libraries/skills_gui/SkillMemoryGui.cpp +++ b/source/RobotAPI/libraries/skills_gui/SkillMemoryGui.cpp @@ -107,8 +107,12 @@ namespace armarx::skills::gui // update cascade connect(this, &SkillMemoryGUI::updateGui, skillGroupBox, &SkillGroupBox::updateGui); + + // we don't want to update the skill details periodically, update can be triggered manually + /* connect( this, &SkillMemoryGUI::updateGui, skillDetailGroupBox, &SkillDetailGroupBox::updateGui); + */ connect(this, &SkillMemoryGUI::updateGui, skillExecutionTreeWidget, diff --git a/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp b/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp index fa9721414..819be6047 100644 --- a/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp +++ b/source/RobotAPI/libraries/skills_gui/skill_details/SkillDetailsTreeWidget.cpp @@ -34,8 +34,11 @@ namespace armarx::skills::gui SkillDetailsTreeWidget::updateContents(const SkillID& skillId, const SkillDescription& descr) { // dont touch the widget if the skill id didn't change + // note: this is only relevant when periodic updates are enabled + /* if (shownSkill.has_value() && skillId == shownSkill.value().skillId) return; + */ // check the parameters: did they change? if (shownSkill.has_value()) @@ -47,7 +50,7 @@ namespace armarx::skills::gui // for now, we just overwrite without asking... (and do nothing) } // other cases: if the parameter types change, we *have* to reset; else the skill - // (probably) can't be started with the parameters. + // cannot be started with the parameters. // same goes for the result type. } diff --git a/source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.cpp b/source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.cpp index ec366c0bf..bc24ba4f6 100644 --- a/source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.cpp +++ b/source/RobotAPI/libraries/skills_gui/skills/SkillTreeWidget.cpp @@ -20,12 +20,6 @@ namespace armarx::skills::gui return; } - if (selectedSkill.skillId == c->skillId) - { - // no change - return; - } - selectedSkill.skillId = c->skillId; emit updateSkillDetails(selectedSkill.skillId); } -- GitLab