Added the Prusa's vendor specific Config Bundle.
Added the "unlocked lock" icon when the system profile gets modified.
This commit is contained in:
parent
30c859ac7f
commit
729d879b0e
1026
resources/profiles/PrusaResearch.ini
Normal file
1026
resources/profiles/PrusaResearch.ini
Normal file
File diff suppressed because it is too large
Load Diff
@ -226,13 +226,15 @@ const std::vector<std::string>& Preset::printer_options()
|
|||||||
"bed_shape", "z_offset", "gcode_flavor", "use_relative_e_distances", "serial_port", "serial_speed",
|
"bed_shape", "z_offset", "gcode_flavor", "use_relative_e_distances", "serial_port", "serial_speed",
|
||||||
"octoprint_host", "octoprint_apikey", "octoprint_cafile", "use_firmware_retraction", "use_volumetric_e", "variable_layer_height",
|
"octoprint_host", "octoprint_apikey", "octoprint_cafile", "use_firmware_retraction", "use_volumetric_e", "variable_layer_height",
|
||||||
"single_extruder_multi_material", "start_gcode", "end_gcode", "before_layer_gcode", "layer_gcode", "toolchange_gcode",
|
"single_extruder_multi_material", "start_gcode", "end_gcode", "before_layer_gcode", "layer_gcode", "toolchange_gcode",
|
||||||
"between_objects_gcode", "printer_vendor", "printer_model", "printer_variant", "printer_notes", "default_print_profile", "default_filament_profile", "inherits",
|
"between_objects_gcode", "printer_vendor", "printer_model", "printer_variant", "printer_notes", "default_print_profile", "inherits",
|
||||||
};
|
};
|
||||||
s_opts.insert(s_opts.end(), Preset::nozzle_options().begin(), Preset::nozzle_options().end());
|
s_opts.insert(s_opts.end(), Preset::nozzle_options().begin(), Preset::nozzle_options().end());
|
||||||
}
|
}
|
||||||
return s_opts;
|
return s_opts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The following nozzle options of a printer profile will be adjusted to match the size
|
||||||
|
// of the nozzle_diameter vector.
|
||||||
const std::vector<std::string>& Preset::nozzle_options()
|
const std::vector<std::string>& Preset::nozzle_options()
|
||||||
{
|
{
|
||||||
// ConfigOptionFloats, ConfigOptionPercents, ConfigOptionBools, ConfigOptionStrings
|
// ConfigOptionFloats, ConfigOptionPercents, ConfigOptionBools, ConfigOptionStrings
|
||||||
@ -240,7 +242,8 @@ const std::vector<std::string>& Preset::nozzle_options()
|
|||||||
"nozzle_diameter", "min_layer_height", "max_layer_height", "extruder_offset",
|
"nozzle_diameter", "min_layer_height", "max_layer_height", "extruder_offset",
|
||||||
"retract_length", "retract_lift", "retract_lift_above", "retract_lift_below", "retract_speed", "deretract_speed",
|
"retract_length", "retract_lift", "retract_lift_above", "retract_lift_below", "retract_speed", "deretract_speed",
|
||||||
"retract_before_wipe", "retract_restart_extra", "retract_before_travel", "wipe",
|
"retract_before_wipe", "retract_restart_extra", "retract_before_travel", "wipe",
|
||||||
"retract_layer_change", "retract_length_toolchange", "retract_restart_extra_toolchange", "extruder_colour"
|
"retract_layer_change", "retract_length_toolchange", "retract_restart_extra_toolchange", "extruder_colour",
|
||||||
|
"default_filament_profile"
|
||||||
};
|
};
|
||||||
return s_opts;
|
return s_opts;
|
||||||
}
|
}
|
||||||
@ -363,7 +366,7 @@ void PresetCollection::save_current_preset(const std::string &new_name)
|
|||||||
inherits = /* preset.vendor->name + "/" + */ old_name;
|
inherits = /* preset.vendor->name + "/" + */ old_name;
|
||||||
} else if (inherits.empty()) {
|
} else if (inherits.empty()) {
|
||||||
// Inheriting from a user preset. Link the new preset to the old preset.
|
// Inheriting from a user preset. Link the new preset to the old preset.
|
||||||
inherits = old_name;
|
// inherits = old_name;
|
||||||
} else {
|
} else {
|
||||||
// Inherited from a user preset. Just maintain the "inherited" flag,
|
// Inherited from a user preset. Just maintain the "inherited" flag,
|
||||||
// meaning it will inherit from either the system preset, or the inherited user preset.
|
// meaning it will inherit from either the system preset, or the inherited user preset.
|
||||||
|
@ -1001,6 +1001,8 @@ void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, wxBitma
|
|||||||
if (wide_icons)
|
if (wide_icons)
|
||||||
bitmap_key += preset.is_compatible ? ",cmpt" : ",ncmpt";
|
bitmap_key += preset.is_compatible ? ",cmpt" : ",ncmpt";
|
||||||
bitmap_key += (preset.is_system || preset.is_default) ? ",syst" : ",nsyst";
|
bitmap_key += (preset.is_system || preset.is_default) ? ",syst" : ",nsyst";
|
||||||
|
if (preset.is_dirty)
|
||||||
|
bitmap_key += ",drty";
|
||||||
wxBitmap *bitmap = m_bitmapCache->find(bitmap_key);
|
wxBitmap *bitmap = m_bitmapCache->find(bitmap_key);
|
||||||
if (bitmap == nullptr) {
|
if (bitmap == nullptr) {
|
||||||
// Create the bitmap with color bars.
|
// Create the bitmap with color bars.
|
||||||
@ -1017,7 +1019,8 @@ void PresetBundle::update_platter_filament_ui(unsigned int idx_extruder, wxBitma
|
|||||||
}
|
}
|
||||||
// Paint a lock at the system presets.
|
// Paint a lock at the system presets.
|
||||||
bmps.emplace_back(m_bitmapCache->mkclear(4, 16));
|
bmps.emplace_back(m_bitmapCache->mkclear(4, 16));
|
||||||
bmps.emplace_back((preset.is_system || preset.is_default) ? *m_bitmapLock : m_bitmapCache->mkclear(16, 16));
|
bmps.emplace_back((preset.is_system || preset.is_default) ?
|
||||||
|
(preset.is_dirty ? *m_bitmapLockOpen : *m_bitmapLock) : m_bitmapCache->mkclear(16, 16));
|
||||||
bitmap = m_bitmapCache->insert(bitmap_key, bmps);
|
bitmap = m_bitmapCache->insert(bitmap_key, bmps);
|
||||||
}
|
}
|
||||||
ui->Append(wxString::FromUTF8((preset.name + (preset.is_dirty ? Preset::suffix_modified() : "")).c_str()), (bitmap == 0) ? wxNullBitmap : *bitmap);
|
ui->Append(wxString::FromUTF8((preset.name + (preset.is_dirty ? Preset::suffix_modified() : "")).c_str()), (bitmap == 0) ? wxNullBitmap : *bitmap);
|
||||||
|
Loading…
Reference in New Issue
Block a user