From a54459d46a7155f874332166750026eae940b848 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Mon, 21 Nov 2022 14:00:14 +0100 Subject: [PATCH] fix: ./src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1356:20: error: 'ofstream' is not a member of 'boost::nowide'; did you mean 'std::ofstream'? ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1357:41: error: 'file' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1369:27: error: 'error' was not declared in this scope; did you mean 'perror'? ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1369:9: error: 'BOOST_LOG_TRIVIAL' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1378:29: error: 'exists' is not a member of 'boost::filesystem' ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1379:27: error: 'warning' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1379:9: error: 'BOOST_LOG_TRIVIAL' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1382:20: error: 'ifstream' is not a member of 'boost::nowide'; did you mean 'std::ifstream'? ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1383:40: error: 'file' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1389:27: error: 'error' was not declared in this scope; did you mean 'perror'? ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1389:9: error: 'BOOST_LOG_TRIVIAL' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1431:27: error: 'info' was not declared in this scope; did you mean 'boost::bimaps::relation::member_at::info'? ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1431:9: error: 'BOOST_LOG_TRIVIAL' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1443:27: error: 'info' was not declared in this scope; did you mean 'boost::bimaps::relation::member_at::info'? ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1443:9: error: 'BOOST_LOG_TRIVIAL' was not declared in this scope ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1448:23: error: 'info' was not declared in this scope; did you mean 'boost::bimaps::relation::member_at::info'? ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1448:5: error: 'BOOST_LOG_TRIVIAL' was not declared in this scope --- src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp | 21 ++++----------------- src/slic3r/GUI/Gizmos/GLGizmoEmboss.hpp | 2 -- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index ffb30f365..9385d9864 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -35,6 +35,8 @@ #include #include +#include + #include #include // measure enumeration of fonts @@ -53,7 +55,6 @@ #define SHOW_FINE_POSITION #define SHOW_WX_WEIGHT_INPUT #define DRAW_PLACE_TO_ADD_TEXT -#define ALLOW_REVERT_ALL_STYLES #endif // ALLOW_DEBUG_MODE using namespace Slic3r; @@ -1313,6 +1314,7 @@ static std::string concat(std::vector data) { return ss.str(); } +#include static boost::filesystem::path get_fontlist_cache_path() { return boost::filesystem::path(data_dir()) / "cache" / "fonts.cereal"; @@ -1351,6 +1353,7 @@ template void serialize(Archive &ar, FacenamesSerializer &t, cons } CEREAL_CLASS_VERSION(FacenamesSerializer, FACENAMES_VERSION); // register class version +#include bool GLGizmoEmboss::store(const Facenames &facenames) { std::string cache_path = get_fontlist_cache_path().string(); boost::nowide::ofstream file(cache_path, std::ios::binary); @@ -2013,16 +2016,6 @@ void GLGizmoEmboss::draw_delete_style_button() { } } -void GLGizmoEmboss::draw_revert_all_styles_button() { - if (draw_button(IconType::revert_all)) { - m_style_manager = StyleManager(m_imgui->get_glyph_ranges()); - m_style_manager.init(nullptr, create_default_styles()); - assert(m_style_manager.get_font_file_with_cache().has_value()); - process(); - } else if (ImGui::IsItemHovered()) - ImGui::SetTooltip("%s", _u8L("Revert all styles").c_str()); -} - void GLGizmoEmboss::fix_transformation(const FontProp &from, const FontProp &to) { @@ -2166,11 +2159,6 @@ void GLGizmoEmboss::draw_style_list() { ImGui::SameLine(); draw_style_add_button(); - -#ifdef ALLOW_REVERT_ALL_STYLES - ImGui::SameLine(); - draw_revert_all_styles_button(); -#endif // ALLOW_REVERT_ALL_STYLES // delete button ImGui::SameLine(); @@ -3137,7 +3125,6 @@ void GLGizmoEmboss::init_icons() "make_unbold.svg", "search.svg", "open.svg", - "revert_all_.svg", "add_text_part.svg", "add_text_negative.svg", "add_text_modifier.svg" diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.hpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.hpp index 9df7722e6..fecbeadaa 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.hpp @@ -105,7 +105,6 @@ private: void fix_transformation(const FontProp &from, const FontProp &to); void draw_style_list(); void draw_delete_style_button(); - void draw_revert_all_styles_button(); void draw_style_rename_popup(); void draw_style_rename_button(); void draw_style_save_button(bool is_modified); @@ -323,7 +322,6 @@ private: unbold, system_selector, open_file, - revert_all, // VolumeType icons part, negative,