mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 22:05:53 +08:00
fix init of string
This commit is contained in:
parent
a6834a1a82
commit
f4fc23ce0d
@ -3391,11 +3391,11 @@ std::optional<TextConfiguration> TextConfigurationSerialization::read(const char
|
|||||||
std::string weight = get_attribute_value_string(attributes, num_attributes, FONT_WEIGHT_ATTR);
|
std::string weight = get_attribute_value_string(attributes, num_attributes, FONT_WEIGHT_ATTR);
|
||||||
if (!weight.empty()) fp.weight = weight;
|
if (!weight.empty()) fp.weight = weight;
|
||||||
|
|
||||||
std::string font_name = "";
|
std::string style_name{}; // should store .3mf file name
|
||||||
std::string font_descriptor = get_attribute_value_string(attributes, num_attributes, FONT_DESCRIPTOR_ATTR);
|
std::string font_descriptor = get_attribute_value_string(attributes, num_attributes, FONT_DESCRIPTOR_ATTR);
|
||||||
std::string type_str = get_attribute_value_string(attributes, num_attributes, FONT_DESCRIPTOR_TYPE_ATTR);
|
std::string type_str = get_attribute_value_string(attributes, num_attributes, FONT_DESCRIPTOR_TYPE_ATTR);
|
||||||
FontItem::Type type = TextConfigurationSerialization::get_type(type_str);
|
FontItem::Type type = TextConfigurationSerialization::get_type(type_str);
|
||||||
FontItem fi(font_name, font_descriptor, type, fp);
|
FontItem fi(style_name, font_descriptor, type, fp);
|
||||||
|
|
||||||
std::string text = get_attribute_value_string(attributes, num_attributes, TEXT_DATA_ATTR);
|
std::string text = get_attribute_value_string(attributes, num_attributes, TEXT_DATA_ATTR);
|
||||||
return TextConfiguration(fi, text);
|
return TextConfiguration(fi, text);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user