ui: removed namespace nodes from graph
Nodes within namespaces are display their full name including the namespace.
This commit is contained in:
@@ -272,7 +272,7 @@ std::shared_ptr<QtGraphNode> QtGraphView::createNodeRecursive(
|
||||
std::shared_ptr<QtGraphNode> newNode;
|
||||
if (node.isGraphNode())
|
||||
{
|
||||
newNode = std::make_shared<QtGraphNodeData>(node.data, node.childVisible);
|
||||
newNode = std::make_shared<QtGraphNodeData>(node.data, node.hasNamespace, node.childVisible);
|
||||
}
|
||||
else if (node.isAccessNode())
|
||||
{
|
||||
|
||||
@@ -5,13 +5,20 @@
|
||||
#include "utility/messaging/type/MessageFocusOut.h"
|
||||
#include "utility/messaging/type/MessageGraphNodeMove.h"
|
||||
|
||||
QtGraphNodeData::QtGraphNodeData(const Node* data, bool childVisible)
|
||||
QtGraphNodeData::QtGraphNodeData(const Node* data, bool hasNamespace, bool childVisible)
|
||||
: m_data(data)
|
||||
, m_childVisible(childVisible)
|
||||
{
|
||||
this->setAcceptHoverEvents(true);
|
||||
|
||||
this->setName(data->getName());
|
||||
if (hasNamespace)
|
||||
{
|
||||
this->setName(data->getFullName());
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setName(data->getName());
|
||||
}
|
||||
}
|
||||
|
||||
QtGraphNodeData::~QtGraphNodeData()
|
||||
@@ -35,10 +42,7 @@ Id QtGraphNodeData::getTokenId() const
|
||||
|
||||
void QtGraphNodeData::onClick()
|
||||
{
|
||||
if (!m_data->isType(Node::NODE_UNDEFINED | Node::NODE_NAMESPACE))
|
||||
{
|
||||
MessageActivateNode(m_data->getId(), m_data->getType(), m_data->getFullName()).dispatch();
|
||||
}
|
||||
MessageActivateNode(m_data->getId(), m_data->getType(), m_data->getFullName()).dispatch();
|
||||
}
|
||||
|
||||
void QtGraphNodeData::moved(const Vec2i& oldPosition)
|
||||
|
||||
@@ -7,7 +7,7 @@ class QtGraphNodeData
|
||||
: public QtGraphNode
|
||||
{
|
||||
public:
|
||||
QtGraphNodeData(const Node* data, bool childVisible);
|
||||
QtGraphNodeData(const Node* data, bool hasNamespace, bool childVisible);
|
||||
virtual ~QtGraphNodeData();
|
||||
|
||||
const Node* getData() const;
|
||||
|
||||
Reference in New Issue
Block a user