Problem: Add an object, name it using cyrilic, Slice, click Export: the proposed name is mangled. Affects all platforms, 2.2.0 was fine.
Cause: It is mangled during ASCII folding, which was broken with 28c0880 when it was generalized to be used from the fuzzy matcher.
fold_to_ascii(wchar_t c, char *out) relies on narrowing char = wchar_t assignment, the old one used std::back_insert_iterator<std::wstring>.
It is thus unable to leave a character alone even when it should (it should, right?).
Solution:
1. Typed the fold_to_ascii function so it works on wchar_t only, which should mimic the old behaviour.
2. Changed the respective call in fts_fuzzy_match.h. That function also works with wide char C-strings.
Cleanup:
1. Removed the unused fold_utf8_to_ascii(const char *src) overload to avoid code duplication.
2. Untemplated the fold_to_ascii(wchar_t c, std::back_insert_iterator<std::wstring>& out) function, it was never called with a different type.
3. The function is now static in ASCIIFolding.cpp, nobody else needs to know.
The issue is that opening the wxMessageDialog in GUI_App::check_printer_presets fires wxEVT_IDLE event (on Linux at least).
At that point it is already bound to our lambda which will in turn call post_init prematurely.
The solution is to move the Bind at the very end of the initialization. The post_init that it calls assumes that init has been finished anyway.
This reverts commits:
57ba953 ("PresetUpdater - exceptions reformatted, not throwing an exception")
03028bb ("Improved exception throwing at copy file in preset updater")
given the diversity of printers and bed types and a typical lack of
auto bed levelling, it will be impossible to get a good fit
for everyone by default.
A very conservative 0.1 for elefant_foot_compensation is unlikely
to cause overcompensation.
And I'd prefer to undercompensate as opposed to overcompensate
as a default.
If value for "Extrusion Multiplier" is out of range, and "NO" is selected in warning message dialog, then set previous value instead of max limit value
1) Use different wxWidgets call to get current time on Windows vs Unix
for efficiency reasons.
2) Don't call this function multiple times in a single function, it is
both expensive and not correct: One shall work with the same timestamp.
3) Added missing unbind of the new timer.
Fix for issues:
Issue 1:
1. Change "Extrusion multiplier" parameter,
2. Save edited preset.
3. Change "Extrusion multiplier" parameter -> preset wasn't marked as "modified"
Issue 2:
1. Change "Extrusion multiplier" parameter with out of range value
2. Push ENTER for the message dialog
3. Answer "Yes"
4. Same message dialog appears again