Skip to content
Snippets Groups Projects
Commit 8796827f authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Merge branch 'master' of gitlab.com:ArmarX/RobotAPI

parents 092887da c91930db
No related branches found
No related tags found
No related merge requests found
#include "JSONTreeModel.h"
#include <ArmarXCore/core/logging/Logging.h>
namespace armarx
{
......@@ -58,6 +60,12 @@ namespace armarx
}
nlohmann::json* child = refFrom(index);
if (!parents.count(child))
{
//ARMARX_WARNING << "Map does not contain parent for child: " <<
// (child ? child->dump(2) : "(null)");
return QModelIndex();
}
nlohmann::json* parent = parents.at(child);
if (parent == nullptr)
{
......@@ -107,6 +115,12 @@ namespace armarx
if (index.column() == 0)
{
if (!names.count(ref))
{
ARMARX_WARNING << "Map does not contain name for ref: " <<
(ref ? ref->dump(2) : "(null)");
return QVariant();
}
std::string const& name = names.at(ref);
return QVariant(name.c_str());
}
......
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