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

fix: execution selection not updated

parent 6f44b9df
No related branches found
No related tags found
1 merge request!406Refactor skill memory GUI
......@@ -13,10 +13,16 @@ namespace armarx::skills::gui
void
SkillExecutionTreeWidget::runContextMenu(const QPoint& pos)
{
// sanity check
ARMARX_CHECK(selectionValid());
QMenu* menu = new QMenu();
// Stop skill
QAction* stopSkillAction = new QAction("Stop execution", this);
const auto& executions = memory->fetchExecutions();
if (!executions.contains(selectedExecution.skillExecutionId))
return;
skills::SkillStatus currentStatus =
memory->fetchExecutions().at(selectedExecution.skillExecutionId).status;
stopSkillAction->setDisabled(currentStatus == skills::SkillStatus::Aborted ||
......@@ -93,11 +99,21 @@ namespace armarx::skills::gui
___qtreewidgetitem->setText(2, "SkillID");
___qtreewidgetitem->setText(1, "Executor");
___qtreewidgetitem->setText(0, "Timestamp");
connectSignals();
}
void
SkillExecutionTreeWidget::connectSignals()
{
connect(this,
&QTreeWidget::customContextMenuRequested,
this,
&SkillExecutionTreeWidget::runContextMenu);
connect(this,
&QTreeWidget::currentItemChanged,
this,
&SkillExecutionTreeWidget::executionSelectionChanged);
}
inline bool
......
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