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:
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user