mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 19:05:55 +08:00
Thumbnails: Fixed a typo in a tooltip and warning texts
+ Added call of handle_legacy_composite() at the end of each Config::load_* functions.
This commit is contained in:
parent
8e693c5a14
commit
7b55ef7520
@ -904,6 +904,10 @@ size_t ConfigBase::load_from_gcode_string_legacy(ConfigBase& config, const char*
|
||||
end = start;
|
||||
}
|
||||
|
||||
// Do legacy conversion on a completely loaded dictionary.
|
||||
// Perform composite conversions, for example merging multiple keys into one key.
|
||||
config.handle_legacy_composite();
|
||||
|
||||
return num_key_value_pairs;
|
||||
}
|
||||
|
||||
@ -1073,6 +1077,10 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &filename
|
||||
|
||||
if (key_value_pairs < 80)
|
||||
throw Slic3r::RuntimeError(format("Suspiciously low number of configuration values extracted from %1%: %2%", filename, key_value_pairs));
|
||||
|
||||
// Do legacy conversion on a completely loaded dictionary.
|
||||
// Perform composite conversions, for example merging multiple keys into one key.
|
||||
this->handle_legacy_composite();
|
||||
return std::move(substitutions_ctxt.substitutions);
|
||||
}
|
||||
|
||||
@ -1114,6 +1122,9 @@ ConfigSubstitutions ConfigBase::load_from_binary_gcode_file(const std::string& f
|
||||
this->set_deserialize(key, value, substitutions_ctxt);
|
||||
}
|
||||
|
||||
// Do legacy conversion on a completely loaded dictionary.
|
||||
// Perform composite conversions, for example merging multiple keys into one key.
|
||||
this->handle_legacy_composite();
|
||||
return std::move(substitutions_ctxt.substitutions);
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ std::string get_error_string(const ThumbnailErrors& errors)
|
||||
std::string error_str;
|
||||
|
||||
if (errors.has(ThumbnailError::InvalidVal))
|
||||
error_str += "\n - " + format("Invalid input format. Expected vector of dimensions in the following format: \"%1%\"", "XxYxEXT, XxYxEXT, ...");
|
||||
error_str += "\n - " + format("Invalid input format. Expected vector of dimensions in the following format: \"%1%\"", "XxY/EXT, XxY/EXT, ...");
|
||||
if (errors.has(ThumbnailError::OutOfRange))
|
||||
error_str += "\n - Input value is out of range";
|
||||
if (errors.has(ThumbnailError::InvalidExt))
|
||||
|
@ -310,7 +310,7 @@ void PrintConfigDef::init_common_params()
|
||||
|
||||
def = this->add("thumbnails", coString);
|
||||
def->label = L("G-code thumbnails");
|
||||
def->tooltip = L("Picture sizes to be stored into a .gcode and .sl1 / .sl1s files, in the following format: \"XxYxEXT, XxYxEXT, ...\"");
|
||||
def->tooltip = L("Picture sizes to be stored into a .gcode and .sl1 / .sl1s files, in the following format: \"XxY/EXT, XxY/EXT, ...\"");
|
||||
def->mode = comExpert;
|
||||
def->gui_type = ConfigOptionDef::GUIType::one_string;
|
||||
def->set_default_value(new ConfigOptionString());
|
||||
|
@ -382,7 +382,7 @@ void Field::get_value_by_opt_type(wxString& str, const bool check_value/* = true
|
||||
set_value(str_out, true);
|
||||
wxString error_str;
|
||||
if (errors.has(ThumbnailError::InvalidVal))
|
||||
error_str += format_wxstr(_L("Invalid input format. Expected vector of dimensions in the following format: \"%1%\""), "XxYxEXT, XxYxEXT, ...");
|
||||
error_str += format_wxstr(_L("Invalid input format. Expected vector of dimensions in the following format: \"%1%\""), "XxY/EXT, XxY/EXT, ...");
|
||||
if (errors.has(ThumbnailError::OutOfRange)) {
|
||||
if (!error_str.empty())
|
||||
error_str += "\n\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user