../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:2405:73: error: conversion from 'wxFont' to non-scalar type 'std::optional<wxFont>' requested
../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:3019:12: warning: unused variable 'wx_font_opt' [-Wunused-variable]
This commit is contained in:
Filip Sykala - NTB T15p 2022-11-21 21:48:52 +01:00
parent a8318ee4f3
commit 788059f3eb

View File

@ -2402,9 +2402,9 @@ void GLGizmoEmboss::draw_style_edit() {
style.prop.boldness = stored_style->prop.boldness; style.prop.boldness = stored_style->prop.boldness;
style.prop.skew = stored_style->prop.skew; style.prop.skew = stored_style->prop.skew;
std::optional<wxFont> new_wx_font = WxFontUtils::load_wxFont(style.path); wxFont new_wx_font = WxFontUtils::load_wxFont(style.path);
if (new_wx_font.has_value() && if (new_wx_font.IsOk() &&
m_style_manager.set_wx_font(*new_wx_font)) m_style_manager.set_wx_font(new_wx_font))
exist_change = true; exist_change = true;
} else if (ImGui::IsItemHovered()) } else if (ImGui::IsItemHovered())
ImGui::SetTooltip("%s", _u8L("Revert font changes.").c_str()); ImGui::SetTooltip("%s", _u8L("Revert font changes.").c_str());
@ -3016,7 +3016,6 @@ bool GLGizmoEmboss::load_configuration(ModelVolume *volume)
return es.name == style.name; return es.name == style.name;
}; };
int wx_font_opt;
wxFont wx_font; wxFont wx_font;
bool is_path_changed = false; bool is_path_changed = false;
if (style.type == WxFontUtils::get_actual_type()) if (style.type == WxFontUtils::get_actual_type())