diff --git a/src/slic3r/plugin/PluginDescriptor.hpp b/src/slic3r/plugin/PluginDescriptor.hpp index 28c411b176..73061aefda 100644 --- a/src/slic3r/plugin/PluginDescriptor.hpp +++ b/src/slic3r/plugin/PluginDescriptor.hpp @@ -66,6 +66,10 @@ struct PluginDescriptor std::string error; // Blocking error message. Non-empty means the plugin is in an error state. std::optional cloud; // Extra cloud state layered on top of a normal plugin descriptor. bool metadata_valid = false; // Manifest/package validity stays separate from the user-facing error field. + // Whether the discovery pass successfully read .install_state.json. This is transient scan + // metadata, used to distinguish an explicit enabled=false from a sidecar that was unavailable + // during a live package replacement. + bool install_state_valid = false; // Package auto-load flag, read from .install_state.json. Defaults to FALSE: a package with no // sidecar has never been installed through Orca and carries no auto-load intent, so it must not // be loaded at startup. Installing a package writes the sidecar with enabled = true. diff --git a/src/slic3r/plugin/PluginFsUtils.cpp b/src/slic3r/plugin/PluginFsUtils.cpp index b0867ef28f..445dd00b9b 100644 --- a/src/slic3r/plugin/PluginFsUtils.cpp +++ b/src/slic3r/plugin/PluginFsUtils.cpp @@ -172,7 +172,7 @@ void scan_plugin_directory(const std::string& dir_path, std::vector disco // A manifest-only rescan has nothing to say about capabilities, so the live module and // instances are left alone. + if (!descriptor.install_state_valid) + descriptor.enabled = existing->descriptor.enabled; existing->descriptor = std::move(descriptor); }