mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-20 01:12:09 +00:00
Catch plugin actions loaded during startup
This commit is contained in:
@@ -3172,6 +3172,17 @@ bool GUI_App::on_init_inner()
|
||||
refresh_plugins_dialog();
|
||||
});
|
||||
|
||||
// Register all AppAction sources
|
||||
m_action_registry.add_source(std::make_unique<ScriptActionSource>());
|
||||
// m_action_registry.add_source(std::make_unique<AnotherActionSource>());
|
||||
// m_action_registry.add_source(std::make_unique<YetAnotherActionSource>());
|
||||
// ...
|
||||
|
||||
// Initialize with all added sources
|
||||
// - register callbacks,
|
||||
// - then enumerate: upsert all actions into registry
|
||||
m_action_registry.init();
|
||||
|
||||
for (const std::string& plugin_key : plugin_mgr.get_catalog().get_enabled_plugin_keys()) {
|
||||
if (!plugin_mgr.get_loader().is_plugin_loaded(plugin_key)) {
|
||||
plugin_mgr.get_loader().load_plugin(plugin_mgr.get_catalog(), plugin_key, false);
|
||||
@@ -3179,9 +3190,6 @@ bool GUI_App::on_init_inner()
|
||||
}
|
||||
}
|
||||
|
||||
m_action_registry.add_source(std::make_unique<ScriptActionSource>());
|
||||
m_action_registry.init();
|
||||
|
||||
if (m_agent)
|
||||
plugin_mgr.set_cloud_agent(std::dynamic_pointer_cast<OrcaCloudServiceAgent>(m_agent->get_cloud_agent()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user