From 4552bd5910654daa2afa22c48f09becf168f0f79 Mon Sep 17 00:00:00 2001
From: Aaron Cuevas Lopez <aacuelo@teleco.upv.es>
Date: Sat, 9 Sep 2017 18:05:30 +0200
Subject: [PATCH] Fix current node name not being set for message center

---
 Source/Processors/Channel/InfoObjects.cpp | 6 +++---
 Source/Processors/Channel/InfoObjects.h   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Source/Processors/Channel/InfoObjects.cpp b/Source/Processors/Channel/InfoObjects.cpp
index cb847a6b0..ac32bb656 100644
--- a/Source/Processors/Channel/InfoObjects.cpp
+++ b/Source/Processors/Channel/InfoObjects.cpp
@@ -30,8 +30,8 @@ HistoryObject::HistoryObject() {}
 NamedInfoObject::NamedInfoObject() {}
 
 //NodeInfoBase
-NodeInfoBase::NodeInfoBase(uint16 id, uint16 idx) :
-m_nodeID(id), m_nodeIdx(idx)
+NodeInfoBase::NodeInfoBase(uint16 id, uint16 idx, String type, String name) :
+m_nodeID(id), m_nodeIdx(idx), m_currentNodeType(type), m_currentNodeName(name)
 {}
 
 NodeInfoBase::~NodeInfoBase()
@@ -148,7 +148,7 @@ String NamedInfoObject::getDescription() const
 
 //InfoObjectCommon
 InfoObjectCommon::InfoObjectCommon(uint16 idx, uint16 typeidx, float sampleRate, const GenericProcessor* source, uint16 subproc)
-	:	NodeInfoBase(source->getNodeId(), idx),
+	:	NodeInfoBase(source->getNodeId(), idx, source->getName(), source->getName()), //TODO: fix those two when we have the ability to rename processors
 		SourceProcessorInfo(source, subproc),
 		m_sourceIndex(idx),
 		m_sourceTypeIndex(typeidx),
diff --git a/Source/Processors/Channel/InfoObjects.h b/Source/Processors/Channel/InfoObjects.h
index cdda5769e..597fa4f30 100644
--- a/Source/Processors/Channel/InfoObjects.h
+++ b/Source/Processors/Channel/InfoObjects.h
@@ -58,7 +58,7 @@ public:
 	String getCurrentNodeName() const;
 protected:
 	NodeInfoBase() = delete;
-	NodeInfoBase(uint16 id, uint16 idx);
+	NodeInfoBase(uint16 id, uint16 idx, String type, String name);
 private:
 	uint16 m_nodeID{ 0 };
 	uint16 m_nodeIdx{ 0 };
-- 
GitLab