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

Implemented new order of skill executions

parent 625a2cba
No related branches found
No related tags found
No related merge requests found
......@@ -454,9 +454,7 @@ namespace armarx
{
std::scoped_lock l(updateMutex);
auto currentManagerStatuses =
memory
->getSkillExecutionStatuses(); // we assume that there are no more than 100 new skills..
auto currentManagerStatuses = memory->getSkillExecutionStatuses();
for (const auto& [k, v] : currentManagerStatuses)
{
......@@ -464,7 +462,7 @@ namespace armarx
auto statusUpdate = skills::SkillStatusUpdate::FromIce(v);
// update maps
skillStatusUpdates.insert_or_assign(executionId, statusUpdate);
skillStatusUpdates[executionId] = statusUpdate;
//skillExecutionParams.insert_or_assign(executionId,
// statusUpdate.usedParameterization);
......@@ -487,24 +485,6 @@ namespace armarx
}
}
/*
// update values
//found->setText(3,
// QString::fromStdString(
// statusUpdate.hasBeenConstructed() ? " yes " : " no "));
found->setText(4,
QString::fromStdString(
statusUpdate.hasBeenInitialized() ? " yes " : " no "));
found->setText(5,
QString::fromStdString(
statusUpdate.hasBeenPrepared() ? " yes " : " no "));
found->setText(6,
QString::fromStdString(
statusUpdate.hasBeenRunning() ? " yes " : " no "));
found->setText(7,
QString::fromStdString(
statusUpdate.hasBeenTerminated() ? " (\xfb) " : ""));
*/
break;
}
}
......@@ -512,8 +492,7 @@ namespace armarx
if (!found)
{
// TODO: Sort to executor!
auto item = new SkillExecutionInfoTreeWidgetItem(
executionId, widget.treeWidgetSkillExecutions);
auto item = new SkillExecutionInfoTreeWidgetItem(executionId);
item->setText(0,
QString::fromStdString(
......@@ -527,6 +506,8 @@ namespace armarx
item->setText(3, QString::fromStdString(i.second));
}
}
widget.treeWidgetSkillExecutions->insertTopLevelItem(0, item);
}
}
}
......
......@@ -75,6 +75,13 @@ namespace armarx
{
}
// After constructing an item, it must be manually inserted into the tree!
SkillExecutionInfoTreeWidgetItem(const skills::SkillExecutionID& id) : executionId(id)
{
}
// When using this constructor, the new item will be _appended_ to the bottom of the tree!
// Use with care.
SkillExecutionInfoTreeWidgetItem(const skills::SkillExecutionID& id, QTreeWidget* parent) :
QTreeWidgetItem(parent), executionId(id)
{
......
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