Description of bug:
During fixing of SPE-1845 there was made changes with 7280b2a0 commit.
But those changes destroyed a initial behavior. All presets are selected correctly now,
but user doesn't receive a notification about temporary installed presets, if any was.
* Fix for SPE-1659 : Wrong filaments update, when templates are allowed/suppressed
* Per Extruder Filaments (related to SPE 1599)
* Implemented compatibility for each extruder separately
* Update of the filaments compatibility is extracted to separate function update_filaments_compatible()
* Fixed synchronization of config.ini with the current selections, when preset is changed from sidebar.
* Filament Settings Tab improvements:
* Added extruder combobox to select active extruder
* PresetCombobox is updated in respect to compatibility for active extruder
* For MM printer: Cog icon near the filament will switch to Filament Settings for selected filament
* Bug fixing for https://dev.prusa3d.com/browse/SPE-1599
* Next round of bugfixing for https://dev.prusa3d.com/browse/SPE-1599
* Fixed crashes from https://dev.prusa3d.com/browse/SPE-1599
+ code refactoring for Tab:save_preset()
- Refactoring and functionality change of PresetUpdater::sync_config. Zip archive now contains only index files. From index file it is decided wheter .ini file should be downloaded and where (cache for update of installed, cache/vendor for unistalled). New vendors are downloaded from set address. Fron .ini file it is decided wheter thumbnail should be downloaded. All resources for already installed vendors are checked and downloaded.
- TemplateFilaments renamed to Templates (Warning: This might create duplicities if both files are present!).
- Various checks added to prevent crashes when dealing with broken presets, wrong files etc.
- Delayed error message when loading present finds duplicities - wait with dialog until Splash screen is gone.
- Minor changes in Config wizard when searching & loading printer thumbnails.
Profiles are ment to be adjusted and saved as user profile.
Selectable in wizard under (Templates).
Installed automatically even when profile with same alias is selected.
Special category in combo boxes.
no_templates option for disabling this.
Cache directory is newly deleted before it is imported from the newer
config location.
Linux specific: When asking for certificate directory, perform import
of configs first.
Find if there is more recent config in other folders (alpha / beta / release).
If yes, ask user, make snapshot, copy files.
if there is no current config, ask user and copy recent one.
1) Activate installed filament or SLA material profile after update_compatible(),
so that the compatiblity and visibility flags of presets are updated.
2) Only activate the first newly installed filament / SLA material profile
if the active printer did not change. This also means that if no filament
profile was active before Wizard was open or it became incompatible with
the newly installed Printer profile, the default filament profile assigned
to the activated Printer is activated preferably, which may or may not
be one of the newly installed filament profiles.
PresetComboBoxes: Auto selection of printer/material preset from the new added presets in ConfigWizard
+ Check unsaved changes if ConfigWizard is running from the PesetComboBoxes
1) Slic3r::RuntimeError was replaced with ConfigurationError,
all exceptions thrown by the configuration layer are derived
from ConfigurationError.
2) When parsing configuration files, ConfigurationError is catched and
rethrown extended with the file name being parsed.
1) Starting with this commit, configuration block exported into G-code
is delimited by "; prusaslicer_config = begin" and "; prusaslicer_config = end".
These delimiters look like any other key / value configuration pairs
on purpose to be compatible with older PrusaSlicer config parsing from G-code.
2) Config parser from G-code newly searches for "; generated by ..."
comment over the complete G-code, thus it is compatible with various
post processing scripts extending the G-code at the start.
3) Config parser from G-code parses PrusaSlicer version from
the "; generated by PrusaSlicer ...." header and if the G-code was
generated by PrusaSlicer 2.4.0-alpha0 and newer, it expects that
the G-code already contains the "; prusaslicer_config = begin / end"
tags and it relies on these tags to extract configuration.
4) A new simple and robust parser was written for reading project configuration
from 3MF / AMF, while a heuristic parser to read config from G-code located
at the end of the G-code file was used before.
config bundles, project files (3MFs, AMFs). When loading these files,
the caller may decide whether to substitute some of the configuration
values the current PrusaSlicer version does not understand with
some reasonable default value, and whether to report it. If substitution
is disabled, an exception is being thrown as before this commit.
If substitution is enabled, list of substitutions is returned by the
API to be presented to the user. This allows us to introduce for example
new firmware flavor key in PrusaSlicer 2.4 while letting PrusaSlicer
2.3.2 to fall back to some default and to report it to the user.
When slicing from command line, substutions are performed by default
and reported into the console, however substitutions may be either
disabled or made silent with the new "config-compatibility" command
line option.
Substitute enums and bools only. Allow booleans to be parsed as
true: "1", "enabled", "on" case insensitive
false: "0", "disabled", "off" case insensitive
This will allow us in the future for example to switch the draft_shield
boolean to an enum with the following values: "disabled" / "enabled" / "limited".
Added "enum_bitmask.hpp" - support for type safe sets of options.
See for example PresetBundle::load_configbundle(...
LoadConfigBundleAttributes flags) for an example of intended usage.
WIP: GUI for reporting the list of config substitutions needs to be
implemented by @YuSanka.
Added check for visibility for all loaded presets.
Added notification about this action.
+ PresetComboBox: Fixed update() function for physical printers, when some of related presets are invisible.