diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index 514c207e8..d1a920b5b 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -315,8 +315,8 @@ bool GLGizmoEmboss::on_mouse_for_rotation(const wxMouseEvent &mouse_event) angle_opt.reset(); // set into activ style - assert(m_style_manager.is_activ_font()); - if (m_style_manager.is_activ_font()) + assert(m_style_manager.is_active_font()); + if (m_style_manager.is_active_font()) m_style_manager.get_font_prop().angle = angle_opt; } @@ -1042,7 +1042,7 @@ bool GLGizmoEmboss::process() if (m_text.empty()) return false; // exist loaded font file? - if (!m_style_manager.is_activ_font()) return false; + if (!m_style_manager.is_active_font()) return false; // Cancel previous Job, when it is in process // Can't use cancel, because I want cancel only previous EmbossUpdateJob no other jobs @@ -1145,8 +1145,8 @@ void GLGizmoEmboss::draw_window() if (ImGui::Button("add svg")) choose_svg_file(); #endif // ALLOW_DEBUG_MODE - bool is_activ_font = m_style_manager.is_activ_font(); - if (!is_activ_font) + bool is_active_font = m_style_manager.is_active_font(); + if (!is_active_font) m_imgui->text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, _L("Warning: No font is selected. Select correct one.")); // Disable all except selection of font, when open text from 3mf with unknown font @@ -1158,7 +1158,7 @@ void GLGizmoEmboss::draw_window() draw_text_input(); draw_model_type(); draw_style_list(); - m_imgui->disabled_begin(!is_activ_font); + m_imgui->disabled_begin(!is_active_font); ImGui::TreePush(); draw_style_edit(); ImGui::TreePop(); @@ -1176,7 +1176,7 @@ void GLGizmoEmboss::draw_window() ImGui::TreePop(); } else if (m_is_advanced_edit_style) set_minimal_window_size(false); - m_imgui->disabled_end(); // !is_activ_font + m_imgui->disabled_end(); // !is_active_font #ifdef SHOW_WX_FONT_DESCRIPTOR if (is_selected_style) @@ -1655,7 +1655,7 @@ void GLGizmoEmboss::draw_font_list() { // Set partial wxString actual_face_name; - if (m_style_manager.is_activ_font()) { + if (m_style_manager.is_active_font()) { const std::optional &wx_font_opt = m_style_manager.get_wx_font(); if (wx_font_opt.has_value()) actual_face_name = wx_font_opt->GetFaceName(); @@ -2088,7 +2088,7 @@ void GLGizmoEmboss::fix_transformation(const FontProp &from, } void GLGizmoEmboss::draw_style_list() { - if (!m_style_manager.is_activ_font()) return; + if (!m_style_manager.is_active_font()) return; const EmbossStyle *stored_style = nullptr; bool is_stored = m_style_manager.exist_stored_style(); @@ -3255,7 +3255,7 @@ DataBase priv::create_emboss_data_base(const std::string &text, StyleManager& st }; auto create_configuration = [&]() -> TextConfiguration { - if (!style_manager.is_activ_font()) { + if (!style_manager.is_active_font()) { std::string default_text_for_emboss = _u8L("Embossed text"); EmbossStyle es = style_manager.get_style(); TextConfiguration tc{es, default_text_for_emboss}; diff --git a/src/slic3r/Utils/EmbossStyleManager.cpp b/src/slic3r/Utils/EmbossStyleManager.cpp index 256b1160b..77df3e217 100644 --- a/src/slic3r/Utils/EmbossStyleManager.cpp +++ b/src/slic3r/Utils/EmbossStyleManager.cpp @@ -200,7 +200,7 @@ bool StyleManager::load_style(const EmbossStyle &style, const wxFont &font) return true; } -bool StyleManager::is_activ_font() { return m_style_cache.font_file.has_value(); } +bool StyleManager::is_active_font() { return m_style_cache.font_file.has_value(); } bool StyleManager::load_first_valid_font() { while (!m_style_items.empty()) { @@ -228,7 +228,7 @@ void StyleManager::clear_imgui_font() { m_style_cache.atlas.Clear(); } ImFont *StyleManager::get_imgui_font() { - if (!is_activ_font()) return nullptr; + if (!is_active_font()) return nullptr; ImVector &fonts = m_style_cache.atlas.Fonts; if (fonts.empty()) return nullptr; diff --git a/src/slic3r/Utils/EmbossStyleManager.hpp b/src/slic3r/Utils/EmbossStyleManager.hpp index 502ba84bd..bc04ede32 100644 --- a/src/slic3r/Utils/EmbossStyleManager.hpp +++ b/src/slic3r/Utils/EmbossStyleManager.hpp @@ -185,7 +185,7 @@ public: }; // check if exist selected font style in manager - bool is_activ_font(); + bool is_active_font(); // Limits for imgui loaded font size // Value out of limits is crop diff --git a/src/slic3r/Utils/EmbossStylesSerializable.cpp b/src/slic3r/Utils/EmbossStylesSerializable.cpp index 483f147b1..a1c3c599a 100644 --- a/src/slic3r/Utils/EmbossStylesSerializable.cpp +++ b/src/slic3r/Utils/EmbossStylesSerializable.cpp @@ -19,7 +19,7 @@ const std::string EmbossStylesSerializable::APP_CONFIG_FONT_COLLECTION = "colle const std::string EmbossStylesSerializable::APP_CONFIG_FONT_CHAR_GAP = "char_gap"; const std::string EmbossStylesSerializable::APP_CONFIG_FONT_LINE_GAP = "line_gap"; -const std::string EmbossStylesSerializable::APP_CONFIG_ACTIVE_FONT = "activ_font"; +const std::string EmbossStylesSerializable::APP_CONFIG_ACTIVE_FONT = "active_font"; std::string EmbossStylesSerializable::create_section_name(unsigned index) { @@ -150,8 +150,8 @@ void EmbossStylesSerializable::store_style_index(AppConfig &cfg, unsigned index) // store actual font index cfg.clear_section(AppConfig::SECTION_EMBOSS_STYLE); // activ font first index is +1 to correspond with section name - std::string activ_font = std::to_string(index); - cfg.set(AppConfig::SECTION_EMBOSS_STYLE, APP_CONFIG_ACTIVE_FONT, activ_font); + std::string active_font = std::to_string(index); + cfg.set(AppConfig::SECTION_EMBOSS_STYLE, APP_CONFIG_ACTIVE_FONT, active_font); } std::optional EmbossStylesSerializable::load_style_index(const AppConfig &cfg)