Fix set of font for macOs

This commit is contained in:
Filip Sykala - NTB T15p 2023-01-11 16:55:12 +01:00
parent 0b655e4b60
commit abc3d52416
2 changed files with 4 additions and 6 deletions
src
libslic3r
slic3r/GUI/Gizmos

View file

@ -267,8 +267,6 @@ class ScopeGuard
{ {
public: public:
typedef std::function<void()> Closure; typedef std::function<void()> Closure;
private:
// bool committed;
Closure closure; Closure closure;
public: public:

View file

@ -1543,7 +1543,7 @@ void GLGizmoEmboss::draw_text_input()
if (!warning.empty()) { if (!warning.empty()) {
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f); ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
ImGui::PushStyleColor(ImGuiCol_Border, ImGuiWrapper::COL_ORANGE_LIGHT); ImGui::PushStyleColor(ImGuiCol_Border, ImGuiWrapper::COL_ORANGE_LIGHT);
input_border_sg = ScopeGuard([]() { ImGui::PopStyleColor(); ImGui::PopStyleVar(); }); input_border_sg.closure = []() { ImGui::PopStyleColor(); ImGui::PopStyleVar(); };
} }
#endif #endif
@ -1935,12 +1935,12 @@ void GLGizmoEmboss::draw_font_list()
// When is unknown font is inside .3mf only font selection is allowed // When is unknown font is inside .3mf only font selection is allowed
// Stop Imgui disable + Guard again start disabling // Stop Imgui disable + Guard again start disabling
ScopeGuard unknown_font_sc; // TODO: fix it for macOS ScopeGuard unknown_font_sc;
if (m_is_unknown_font) { if (m_is_unknown_font) {
m_imgui->disabled_end(); m_imgui->disabled_end();
unknown_font_sc = ScopeGuard([&]() { unknown_font_sc.closure = [&]() {
m_imgui->disabled_begin(true); m_imgui->disabled_begin(true);
}); };
} }
ImGui::SetNextItemWidth(m_gui_cfg->input_width); ImGui::SetNextItemWidth(m_gui_cfg->input_width);