From e00fd99d3ca17c87cbd813feab500fab85fc2eee Mon Sep 17 00:00:00 2001 From: David Kekesi Date: Thu, 24 Oct 2024 16:25:27 +0200 Subject: [PATCH] modelcards are loaded on document switch --- .../Connector/Interface/ConnectorPalette.cpp | 11 ++++++++++- .../Speckle/Event/Subscriber/ProjectSubscriber.h | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/SpeckleConnector/Connector/Interface/ConnectorPalette.cpp b/SpeckleConnector/Connector/Interface/ConnectorPalette.cpp index da4a920..191d10f 100644 --- a/SpeckleConnector/Connector/Interface/ConnectorPalette.cpp +++ b/SpeckleConnector/Connector/Interface/ConnectorPalette.cpp @@ -166,15 +166,24 @@ BrowserPalette::BrowserPalette() : BeginEventProcessing(); //Install required connector bridges install(); - install(); + + if (auto ref = install(); ref) { + if (auto baseBridgeRef = std::dynamic_pointer_cast(ref); baseBridgeRef) { + connector::connector()->addWeak(baseBridgeRef); + baseBridgeRef->start(); + } + } + install(); install(); + if (auto ref = install(); ref) { if (auto selectionBridgeRef = std::dynamic_pointer_cast(ref); selectionBridgeRef) { connector::connector()->addWeak(selectionBridgeRef); selectionBridgeRef->start(); } } + install(); InitBrowserControl(); } diff --git a/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h b/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h index 0e8c164..37d128a 100644 --- a/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h +++ b/SpeckleLib/Speckle/Event/Subscriber/ProjectSubscriber.h @@ -46,13 +46,13 @@ namespace speckle::event { @return True if the event should be closed */ bool receive(const active::event::Event& event) override; - - protected: /*! Start the participant operation @return True if the participant is able to continue */ bool start() override; + + protected: /*! Handle a project event @param event The project event