mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 01:02:08 +00:00
chore: UI Updates
This commit is contained in:
@@ -18,12 +18,6 @@ namespace Slic3r {
|
||||
|
||||
class PluginCapabilityInterface;
|
||||
|
||||
enum class PluginConfigSource {
|
||||
None,
|
||||
Base,
|
||||
Preset,
|
||||
};
|
||||
|
||||
/*
|
||||
Example config.json shape
|
||||
{
|
||||
|
||||
@@ -91,15 +91,6 @@ std::string serialize_plugin_overrides(const CapabilityConfigDocument& document)
|
||||
return document.empty() ? std::string() : document.serialize_entries().dump();
|
||||
}
|
||||
|
||||
std::string plugin_config_source_to_string(PluginConfigSource source)
|
||||
{
|
||||
switch (source) {
|
||||
case PluginConfigSource::Preset: return "preset";
|
||||
case PluginConfigSource::Base: return "base";
|
||||
default: return "none";
|
||||
}
|
||||
}
|
||||
|
||||
EffectiveCapabilityConfig PresetPluginConfigService::get_effective_config(const CapabilityConfigDocument& overrides,
|
||||
const PluginCapabilityIdentifier& id) const
|
||||
{
|
||||
@@ -112,14 +103,12 @@ EffectiveCapabilityConfig PresetPluginConfigService::get_effective_config(const
|
||||
|
||||
if (const auto entry = overrides.find(result.id)) {
|
||||
result.has_preset_override = true;
|
||||
result.source = PluginConfigSource::Preset;
|
||||
result.config = entry->cap_config;
|
||||
result.stored_plugin_version = entry->plugin_version;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (result.has_base_config) {
|
||||
result.source = PluginConfigSource::Base;
|
||||
result.config = base.config;
|
||||
result.stored_plugin_version = base.plugin_version;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ struct EffectiveCapabilityConfig
|
||||
{
|
||||
CapabilityConfigId id;
|
||||
nlohmann::json config = nlohmann::json::object();
|
||||
PluginConfigSource source = PluginConfigSource::None;
|
||||
|
||||
bool has_preset_override = false;
|
||||
bool has_base_config = false;
|
||||
@@ -46,8 +45,6 @@ struct MutationResult
|
||||
EffectiveCapabilityConfig effective;
|
||||
};
|
||||
|
||||
std::string plugin_config_source_to_string(PluginConfigSource source);
|
||||
|
||||
// Resolves a capability's effective config as `preset override -> base config -> none`, and mutates
|
||||
// the override layer. It works on a CapabilityConfigDocument the caller owns, never on a Preset and
|
||||
// never on the base config file, which keeps the two layers from writing to each other:
|
||||
|
||||
Reference in New Issue
Block a user