ConnectorProject should add its model card database to the add-on as a subscriber in order to receive document events, e.g. merge

This commit is contained in:
Ralph Wessel
2024-11-06 13:06:25 +00:00
parent 08c15c87a2
commit fbbf559e83
2 changed files with 4 additions and 2 deletions
@@ -3,6 +3,7 @@
#include "Connector/Connector.h"
#include "Connector/Database/ModelCardDatabase.h"
using namespace active::event;
using namespace connector::database;
using namespace connector::environment;
using namespace speckle::utility;
@@ -11,7 +12,8 @@ using namespace speckle::utility;
Default constructor
--------------------------------------------------------------------*/
ConnectorProject::ConnectorProject() {
m_modelCards = std::make_unique<ModelCardDatabase>();
m_modelCards = std::make_shared<ModelCardDatabase>();
connector()->addWeak(m_modelCards->getSubscription());
}
@@ -45,7 +45,7 @@ namespace connector::environment {
private:
///The model card database
std::unique_ptr<connector::database::ModelCardDatabase> m_modelCards;
std::shared_ptr<connector::database::ModelCardDatabase> m_modelCards;
};
}