Skip to content
Snippets Groups Projects
Commit 8e2176c1 authored by Peter Albrecht's avatar Peter Albrecht
Browse files

Added placeholder check for changed defaults

parent d70638c0
No related branches found
No related tags found
1 merge request!406Refactor skill memory GUI
......@@ -34,6 +34,21 @@ namespace armarx::skills::gui
// dont touch the widget if the skill id didn't change
if (shownSkill.has_value() && skillId == shownSkill.value().skillId)
return;
// check the parameters: did they change?
if (shownSkill.has_value())
{
auto remDesc = shownSkill.value().skillDescr;
if (descr.rootProfileDefaults != remDesc.rootProfileDefaults)
{
// TODO: ask the user if they want to reset to defaults
// 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.
// same goes for the result type.
}
this->resetWidget();
auto aron_args = descr.parametersType;
......
......@@ -39,8 +39,6 @@ namespace armarx::skills::gui
std::optional<ShownSkill> shownSkill;
// check for update
skills::SkillDescription shownDescription;
AronTreeWidgetControllerPtr aronTreeWidgetController = nullptr;
void setupUi();
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment