mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-06 23:31:19 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db0c4b277a | ||
|
|
13d4a0d922 | ||
|
|
c74ac8a6c3 | ||
|
|
2d90345d1e |
@@ -23,11 +23,6 @@ enum ClipType { ctIntersection, ctUnion, ctDifference, ctXor };
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
// import these wherever we're included
|
||||
using Slic3r::jtMiter;
|
||||
using Slic3r::jtRound;
|
||||
using Slic3r::jtSquare;
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
static constexpr const float ClipperSafetyOffset = 10.f;
|
||||
|
||||
@@ -352,6 +352,16 @@ void FillSpiralInset::_fill_surface_single(const FillParams& params,
|
||||
assert(params.use_arachne);
|
||||
assert(this->print_config != nullptr && this->print_object_config != nullptr);
|
||||
|
||||
// Internal solid infill must not add Arachne's standalone thin walls: one of those walls can
|
||||
// become the extra centre point after the spiral has finished. Top and bottom surfaces keep
|
||||
// Arachne, including the centre plug handled by generate_spiral_insets().
|
||||
if (params.extrusion_role == erSolidInfill) {
|
||||
Polylines polylines;
|
||||
this->_fill_surface_single(params, thickness_layers, direction, expolygon, polylines);
|
||||
append(thick_polylines_out, to_thick_polylines(std::move(polylines), scaled<coord_t>(this->spacing)));
|
||||
return;
|
||||
}
|
||||
|
||||
// Only a solid surface is worth the variable width walls; a sparse one falls back to plain loops.
|
||||
if (params.density <= 0.9999f || params.dont_adjust) {
|
||||
Polylines polylines;
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
class AuxiliaryModelNode;
|
||||
WX_DEFINE_ARRAY_PTR(AuxiliaryModelNode*, AuxiliaryModelNodePtrArray);
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
class AuxiliaryModelNode
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -73,10 +73,6 @@ private:
|
||||
CancelFn m_cancel_cb;
|
||||
};
|
||||
|
||||
namespace GUI {
|
||||
using Slic3r::BBLStatusBar;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // BBLSTATUSBAR_HPP
|
||||
|
||||
@@ -80,10 +80,6 @@ private:
|
||||
CancelFn m_cancel_cb_fina;
|
||||
};
|
||||
|
||||
namespace GUI {
|
||||
using Slic3r::BBLStatusBarBind;
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#endif // BBLSTATUSBAR_HPP
|
||||
|
||||
@@ -97,10 +97,6 @@ private:
|
||||
CancelFn m_cancel_cb_fina;
|
||||
};
|
||||
|
||||
namespace GUI {
|
||||
using Slic3r::BBLStatusBarPrint;
|
||||
}
|
||||
|
||||
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO, wxCommandEvent);
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
@@ -99,10 +99,6 @@ private:
|
||||
CancelFn m_cancel_cb_fina;
|
||||
};
|
||||
|
||||
namespace GUI {
|
||||
using Slic3r::BBLStatusBarSend;
|
||||
}
|
||||
|
||||
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO_SEND, wxCommandEvent);
|
||||
wxDECLARE_EVENT(EVT_SHOW_ERROR_FAIL_SEND, wxCommandEvent);
|
||||
} // namespace Slic3r
|
||||
|
||||
@@ -58,8 +58,6 @@ public:
|
||||
static bool parse_color(const std::string& scolor, unsigned char* rgb_out);
|
||||
static bool parse_color4(const std::string& scolor, unsigned char* rgba_out);
|
||||
|
||||
// Rasterizes the SVG into a freshly generated GL texture; the caller owns it and has to delete
|
||||
// it (ImGuiWrapper::svg_texture() caches the result for the whole session).
|
||||
static bool load_from_svg_file_change_color(const std::string &filename, unsigned width, unsigned height, ImTextureID &texture_id, const char *hexColor);
|
||||
|
||||
|
||||
|
||||
@@ -3416,8 +3416,7 @@ void GLCanvas3D::load_sla_preview()
|
||||
|
||||
void GLCanvas3D::bind_event_handlers()
|
||||
{
|
||||
// Every view switch binds, so binding twice would run each handler twice per event.
|
||||
if (m_canvas != nullptr && !m_event_handlers_bound) {
|
||||
if (m_canvas != nullptr) {
|
||||
m_canvas->Bind(wxEVT_SIZE, &GLCanvas3D::on_size, this);
|
||||
m_canvas->Bind(wxEVT_IDLE, &GLCanvas3D::on_idle, this);
|
||||
m_canvas->Bind(wxEVT_CHAR, &GLCanvas3D::on_char, this);
|
||||
@@ -3427,9 +3426,9 @@ void GLCanvas3D::bind_event_handlers()
|
||||
m_canvas->Bind(wxEVT_TIMER, &GLCanvas3D::on_timer, this);
|
||||
m_canvas->Bind(EVT_GLCANVAS_RENDER_TIMER, &GLCanvas3D::on_render_timer, this);
|
||||
m_toolbar_highlighter.set_timer_owner(m_canvas, 0);
|
||||
m_canvas->Bind(EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, &GLCanvas3D::on_toolbar_highlighter_timer, this);
|
||||
m_canvas->Bind(EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, [this](wxTimerEvent&) { m_toolbar_highlighter.blink(); });
|
||||
m_gizmo_highlighter.set_timer_owner(m_canvas, 0);
|
||||
m_canvas->Bind(EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, &GLCanvas3D::on_gizmo_highlighter_timer, this);
|
||||
m_canvas->Bind(EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, [this](wxTimerEvent&) { m_gizmo_highlighter.blink(); });
|
||||
m_canvas->Bind(wxEVT_LEFT_DOWN, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Bind(wxEVT_LEFT_UP, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Bind(wxEVT_MIDDLE_DOWN, &GLCanvas3D::on_mouse, this);
|
||||
@@ -3444,7 +3443,14 @@ void GLCanvas3D::bind_event_handlers()
|
||||
m_canvas->Bind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Bind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
||||
m_canvas->Bind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
|
||||
m_canvas->Bind(wxEVT_KILL_FOCUS, &GLCanvas3D::on_kill_focus, this);
|
||||
m_canvas->Bind(wxEVT_KILL_FOCUS, [this](wxFocusEvent& evt) {
|
||||
// The key-up that would commit a keyboard edit goes to whatever took the focus.
|
||||
if (m_selection_edit.kind != SelectionEdit::None)
|
||||
finish_selection_edit();
|
||||
ImGui::SetWindowFocus(nullptr);
|
||||
render();
|
||||
evt.Skip();
|
||||
});
|
||||
m_event_handlers_bound = true;
|
||||
|
||||
m_canvas->Bind(wxEVT_GESTURE_PAN, &GLCanvas3D::on_gesture, this);
|
||||
@@ -3482,9 +3488,6 @@ void GLCanvas3D::unbind_event_handlers()
|
||||
m_canvas->Unbind(wxEVT_RIGHT_DCLICK, &GLCanvas3D::on_mouse, this);
|
||||
m_canvas->Unbind(wxEVT_PAINT, &GLCanvas3D::on_paint, this);
|
||||
m_canvas->Unbind(wxEVT_SET_FOCUS, &GLCanvas3D::on_set_focus, this);
|
||||
m_canvas->Unbind(wxEVT_KILL_FOCUS, &GLCanvas3D::on_kill_focus, this);
|
||||
m_canvas->Unbind(EVT_GLCANVAS_TOOLBAR_HIGHLIGHTER_TIMER, &GLCanvas3D::on_toolbar_highlighter_timer, this);
|
||||
m_canvas->Unbind(EVT_GLCANVAS_GIZMO_HIGHLIGHTER_TIMER, &GLCanvas3D::on_gizmo_highlighter_timer, this);
|
||||
m_event_handlers_bound = false;
|
||||
|
||||
m_canvas->Unbind(wxEVT_GESTURE_PAN, &GLCanvas3D::on_gesture, this);
|
||||
@@ -5002,26 +5005,6 @@ void GLCanvas3D::on_set_focus(wxFocusEvent& evt)
|
||||
m_is_touchpad_navigation = wxGetApp().app_config->get_bool("camera_navigation_style");
|
||||
}
|
||||
|
||||
void GLCanvas3D::on_kill_focus(wxFocusEvent& evt)
|
||||
{
|
||||
// The key-up that would commit a keyboard edit goes to whatever took the focus.
|
||||
if (m_selection_edit.kind != SelectionEdit::None)
|
||||
finish_selection_edit();
|
||||
ImGui::SetWindowFocus(nullptr);
|
||||
render();
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void GLCanvas3D::on_toolbar_highlighter_timer(wxTimerEvent& evt)
|
||||
{
|
||||
m_toolbar_highlighter.blink();
|
||||
}
|
||||
|
||||
void GLCanvas3D::on_gizmo_highlighter_timer(wxTimerEvent& evt)
|
||||
{
|
||||
m_gizmo_highlighter.blink();
|
||||
}
|
||||
|
||||
bool GLCanvas3D::clicked_button_matches_action(const wxMouseEvent& evt, const MouseAction action, const std::map<MouseButton, MouseAction>& mappings) const
|
||||
{
|
||||
MouseButton clicked = MouseButton::None;
|
||||
@@ -7987,9 +7970,16 @@ void GLCanvas3D::_render_fps_overlay(int fps) const
|
||||
const float margin = 10.0f * get_scale();
|
||||
const ImVec2 display_size = ImGui::GetIO().DisplaySize;
|
||||
ImVec2 pos(display_size.x - margin, margin);
|
||||
// Last frame's size; zero until the overlay has been shown once.
|
||||
const ImGuiWindow* self = ImGui::FindWindowByName("###fps_overlay");
|
||||
const float left = pos.x - (self != nullptr ? self->Size.x : 0.0f);
|
||||
// The Preview legend takes the top-right corner.
|
||||
if (const ImGuiWindow* legend = ImGui::FindWindowByName("Legend"); m_canvas_type == ECanvasType::CanvasPreview && legend != nullptr && legend->Active)
|
||||
pos = ImVec2(legend->Pos.x - margin, legend->Pos.y);
|
||||
// The toolbar row can reach the corner on a narrow canvas; stack the overlay below it then.
|
||||
else if (m_main_toolbar.is_enabled() &&
|
||||
get_main_toolbar_offset() + m_main_toolbar.get_width() + m_separator_toolbar.get_width() + m_gizmos.get_scaled_total_width() + m_assemble_view_toolbar.get_width() > left)
|
||||
pos.y = std::max(m_main_toolbar.get_height(), m_gizmos.get_scaled_total_height()) + margin;
|
||||
ImGui::SetNextWindowPos(pos, ImGuiCond_Always, ImVec2(1.0f, 0.0f));
|
||||
ImGui::SetNextWindowBgAlpha(0.35f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 8.0f * get_scale());
|
||||
|
||||
@@ -1203,9 +1203,6 @@ public:
|
||||
void on_gesture(wxGestureEvent& evt);
|
||||
void on_paint(wxPaintEvent& evt);
|
||||
void on_set_focus(wxFocusEvent& evt);
|
||||
void on_kill_focus(wxFocusEvent& evt);
|
||||
void on_toolbar_highlighter_timer(wxTimerEvent& evt);
|
||||
void on_gizmo_highlighter_timer(wxTimerEvent& evt);
|
||||
void force_set_focus();
|
||||
|
||||
enum class MouseButton { None, Left, Middle, Right };
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
#include <wx/gdicmn.h>
|
||||
#include "slic3r/GUI/wxExtensions.hpp"
|
||||
@@ -2082,15 +2081,9 @@ wxMenu* MenuFactory::instance_menu()
|
||||
return &m_instance_menu;
|
||||
}
|
||||
|
||||
MenuWithSeparators* MenuFactory::new_transient_menu()
|
||||
{
|
||||
m_transient_menu = std::make_unique<MenuWithSeparators>();
|
||||
return m_transient_menu.get();
|
||||
}
|
||||
|
||||
wxMenu* MenuFactory::layer_menu()
|
||||
{
|
||||
MenuWithSeparators* menu = new_transient_menu();
|
||||
MenuWithSeparators* menu = new MenuWithSeparators();
|
||||
append_menu_item_settings(menu);
|
||||
|
||||
return menu;
|
||||
@@ -2116,13 +2109,13 @@ wxMenu* MenuFactory::multi_selection_menu()
|
||||
}
|
||||
|
||||
if (all_plates) {
|
||||
wxMenu* menu = new_transient_menu();
|
||||
wxMenu* menu = new MenuWithSeparators();
|
||||
append_menu_item_replace_all_with_stl(menu);
|
||||
return menu;
|
||||
}
|
||||
if (undefined_type)
|
||||
return nullptr;
|
||||
wxMenu* menu = new_transient_menu();
|
||||
wxMenu* menu = new MenuWithSeparators();
|
||||
if (!multi_volume) {
|
||||
int index = 0;
|
||||
if (obj_list()->can_merge_to_multipart_object()) {
|
||||
@@ -2196,7 +2189,7 @@ wxMenu* MenuFactory::assemble_multi_selection_menu()
|
||||
// show this menu only for Objects(Instances mixed with Objects)/Volumes selection
|
||||
return nullptr;
|
||||
|
||||
wxMenu* menu = new_transient_menu();
|
||||
wxMenu* menu = new MenuWithSeparators();
|
||||
append_menu_item_set_visible(menu);
|
||||
//append_menu_item_fix_through_cgal(menu);
|
||||
//append_menu_item_simplify(menu);
|
||||
@@ -2242,7 +2235,7 @@ wxMenu* MenuFactory::plate_menu()
|
||||
|
||||
wxMenu* MenuFactory::assemble_object_menu()
|
||||
{
|
||||
wxMenu* menu = new_transient_menu();
|
||||
wxMenu* menu = new MenuWithSeparators();
|
||||
// Set Visible
|
||||
append_menu_item_set_visible(menu);
|
||||
// Delete
|
||||
@@ -2262,7 +2255,7 @@ wxMenu* MenuFactory::assemble_object_menu()
|
||||
|
||||
wxMenu* MenuFactory::assemble_part_menu()
|
||||
{
|
||||
wxMenu* menu = new_transient_menu();
|
||||
wxMenu* menu = new MenuWithSeparators();
|
||||
|
||||
append_menu_item_set_visible(menu);
|
||||
append_menu_item_delete(menu);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define slic3r_GUI_Factories_hpp_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
@@ -122,12 +121,6 @@ private:
|
||||
MenuWithSeparators m_assemble_part_menu;
|
||||
|
||||
wxMenu m_filament_action_menu;
|
||||
|
||||
// The selection dependent menus are rebuilt for every popup, so they cannot be members that
|
||||
// outlive a build like the ones above; this owns the current one and destroys the previous.
|
||||
// One slot is enough because PopupMenu() is synchronous: the menu a caller was handed is gone
|
||||
// from the screen before anything can ask for the next one.
|
||||
std::unique_ptr<MenuWithSeparators> m_transient_menu;
|
||||
|
||||
|
||||
// Removed/Prepended Items according to the view mode
|
||||
@@ -135,9 +128,6 @@ private:
|
||||
std::array<wxMenuItem*, mtCount> items_decrease;
|
||||
std::array<wxMenuItem*, mtCount> items_set_number_of_copies;
|
||||
|
||||
// Replaces m_transient_menu with an empty menu and returns it.
|
||||
MenuWithSeparators* new_transient_menu();
|
||||
|
||||
void create_default_menu();
|
||||
void create_common_object_menu(wxMenu *menu);
|
||||
void create_object_menu();
|
||||
|
||||
@@ -2317,10 +2317,6 @@ void GLGizmoMeasure::update_measurement_result()
|
||||
void GLGizmoMeasure::reset_all_pick()
|
||||
{
|
||||
std::map<GLVolume*, std::shared_ptr<PickRaycaster>>().swap(m_mesh_raycaster_map);
|
||||
// register_single_mesh_pick() fills both maps in lockstep, so the measurings have to go with
|
||||
// the raycasters; otherwise the entries keyed on the GLVolumes of the previous selection stay
|
||||
// behind for the rest of the session.
|
||||
std::map<GLVolume*, std::shared_ptr<Measure::Measuring>>().swap(m_mesh_measure_map);
|
||||
reset_gripper_pick(GripperType::UNDEFINE,true);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ enum class PainterGizmoType {
|
||||
FDM_SUPPORTS,
|
||||
SEAM,
|
||||
MM_SEGMENTATION,
|
||||
FUZZY_SKIN
|
||||
FUZZY_SKIN,
|
||||
TEXTURE_DISPLACEMENT
|
||||
};
|
||||
|
||||
class TriangleSelectorGUI : public TriangleSelector {
|
||||
@@ -111,9 +112,7 @@ class TriangleSelectorPatch : public TriangleSelectorGUI {
|
||||
public:
|
||||
explicit TriangleSelectorPatch(const TriangleMesh& mesh, const std::vector<ColorRGBA> ebt_colors, float edge_limit = 0.6f)
|
||||
: TriangleSelectorGUI(mesh, edge_limit), m_ebt_colors(ebt_colors) {}
|
||||
// Releases the VAO and the per-patch VBOs built by finalize_triangle_indices(). The base class
|
||||
// already deletes GL buffers from its GLModel members here, so this needs no context of its own.
|
||||
virtual ~TriangleSelectorPatch() { release_geometry(); }
|
||||
virtual ~TriangleSelectorPatch() = default;
|
||||
|
||||
// Render current selection. Transformation matrices are supposed
|
||||
// to be already set.
|
||||
|
||||
@@ -385,7 +385,6 @@ ImGuiWrapper::~ImGuiWrapper()
|
||||
{
|
||||
//destroy_fonts_texture();
|
||||
destroy_font();
|
||||
destroy_svg_textures();
|
||||
ImGui::DestroyContext();
|
||||
}
|
||||
|
||||
@@ -567,12 +566,6 @@ bool ImGuiWrapper::update_key_data(wxKeyEvent &evt)
|
||||
return ret;
|
||||
}
|
||||
|
||||
// SVG icons rasterized into GL textures, keyed on file name, size and recolor. Cleared as a whole
|
||||
// from new_frame() once it grows past MAX_SVG_TEXTURES, which is safe there: the previous frame has
|
||||
// been rendered and the frame about to be recorded asks for every icon it draws again.
|
||||
static std::map<std::string, ImTextureID> s_svg_textures;
|
||||
static const size_t MAX_SVG_TEXTURES = 256;
|
||||
|
||||
void ImGuiWrapper::new_frame()
|
||||
{
|
||||
if (m_new_frame_open) {
|
||||
@@ -583,11 +576,6 @@ void ImGuiWrapper::new_frame()
|
||||
init_font(true);
|
||||
}
|
||||
|
||||
// Recolored icons accumulate one texture per color the session has shown; drop them before
|
||||
// anything references them again. This frame recreates the handful it actually draws.
|
||||
if (s_svg_textures.size() > MAX_SVG_TEXTURES)
|
||||
destroy_svg_textures();
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
ImGui::NewFrame();
|
||||
@@ -1840,7 +1828,8 @@ bool menu_item_with_icon(const char *label, const char *shortcut, ImVec2 icon_si
|
||||
if (icon_color != 0)
|
||||
ImGui::RenderFrame(icon_pos, icon_pos + icon_size, icon_color);
|
||||
else {
|
||||
ImTextureID transparent = ImGuiWrapper::svg_texture(Slic3r::resources_dir() + "/images/transparent.svg", icon_size.x, icon_size.y);
|
||||
static ImTextureID transparent;
|
||||
IMTexture::load_from_svg_file(Slic3r::resources_dir() + "/images/transparent.svg", icon_size.x, icon_size.y, transparent);
|
||||
window->DrawList->AddImage(transparent, icon_pos, icon_pos + icon_size, { 0,0 }, { 1,1 }, ImGui::GetColorU32(ImVec4(1.f, 1.f, 1.f, 1.f)));
|
||||
}
|
||||
}
|
||||
@@ -3420,36 +3409,6 @@ bool ImGuiWrapper::display_initialized() const
|
||||
return io.DisplaySize.x >= 0.0f && io.DisplaySize.y >= 0.0f;
|
||||
}
|
||||
|
||||
ImTextureID ImGuiWrapper::svg_texture(const std::string& filename, unsigned width, unsigned height, const char* hex_color)
|
||||
{
|
||||
std::string key = filename + "|" + std::to_string(width) + "x" + std::to_string(height);
|
||||
if (hex_color != nullptr)
|
||||
key += std::string("|") + hex_color;
|
||||
|
||||
const auto it = s_svg_textures.find(key);
|
||||
if (it != s_svg_textures.end())
|
||||
return it->second;
|
||||
|
||||
ImTextureID texture_id = nullptr;
|
||||
const bool loaded = (hex_color != nullptr) ?
|
||||
BitmapCache::load_from_svg_file_change_color(filename, width, height, texture_id, hex_color) :
|
||||
IMTexture::load_from_svg_file(filename, width, height, texture_id);
|
||||
if (!loaded)
|
||||
return nullptr;
|
||||
|
||||
s_svg_textures.emplace(std::move(key), texture_id);
|
||||
return texture_id;
|
||||
}
|
||||
|
||||
void ImGuiWrapper::destroy_svg_textures()
|
||||
{
|
||||
for (const auto& texture : s_svg_textures) {
|
||||
GLuint texture_id = (GLuint)(intptr_t)texture.second;
|
||||
glsafe(::glDeleteTextures(1, &texture_id));
|
||||
}
|
||||
s_svg_textures.clear();
|
||||
}
|
||||
|
||||
void ImGuiWrapper::destroy_font()
|
||||
{
|
||||
if (m_font_texture != 0) {
|
||||
@@ -3529,6 +3488,7 @@ void ImGuiWrapper::filament_group(const std::string& filament_type, const char*
|
||||
//ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0));
|
||||
std::string id = std::to_string(static_cast<unsigned int> (filament_id + 1));
|
||||
ImDrawList* draw_list = ImGui::GetWindowDrawList();
|
||||
static ImTextureID transparent;
|
||||
ImVec2 text_size = ImGui::CalcTextSize(filament_type.c_str());
|
||||
// BBS image sizing based on text width (DPI scaling)
|
||||
float img_width = ImGui::CalcTextSize("ABC").x;
|
||||
@@ -3541,7 +3501,7 @@ void ImGuiWrapper::filament_group(const std::string& filament_type, const char*
|
||||
if (rgba[3] == 0x00) {
|
||||
svg_path = "/images/outlined_rect_transparent.svg";
|
||||
}
|
||||
ImTextureID transparent = svg_texture(Slic3r::resources_dir() + svg_path, img_size.x, img_size.y, hex_color);
|
||||
BitmapCache::load_from_svg_file_change_color(Slic3r::resources_dir() + svg_path, img_size.x, img_size.y, transparent, hex_color);
|
||||
ImGui::BeginGroup();
|
||||
{
|
||||
ImVec2 cursor_pos = ImGui::GetCursorScreenPos();
|
||||
|
||||
@@ -108,14 +108,6 @@ public:
|
||||
// Hash of every draw list's vertices, indices and commands.
|
||||
static ImGuiID draw_data_signature(const ImDrawData* draw_data);
|
||||
|
||||
// A GL texture holding an SVG icon rasterized at width x height, optionally recolored.
|
||||
// Rasterizing an SVG is far too expensive to redo for every frame that draws the icon, and the
|
||||
// texture the previous frame generated would leak, so the result is kept until the frame that
|
||||
// finds the cache overgrown drops it (and rebuilds only what it still draws).
|
||||
static ImTextureID svg_texture(const std::string& filename, unsigned width, unsigned height, const char* hex_color = nullptr);
|
||||
// Deletes every texture svg_texture() handed out. Requires a current GL context.
|
||||
static void destroy_svg_textures();
|
||||
|
||||
float scaled(float x) const { return x * m_font_size; }
|
||||
ImVec2 scaled(float x, float y) const { return ImVec2(x * m_font_size, y * m_font_size); }
|
||||
/// <summary>
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
|
||||
class wxWindow;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include "Job.hpp"
|
||||
#include "PrintJob.hpp"
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
class wxWindow;
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
|
||||
@@ -2250,12 +2250,11 @@ void NotificationManager::close_and_delete_self(PopNotification * self)
|
||||
}
|
||||
|
||||
void NotificationManager::remove_notification_of_type(const NotificationType type) {
|
||||
// Seven notification types may have several instances alive at once, so erase every match:
|
||||
// stopping at the first one leaves the rest (and the ObjectIDs they hold) behind.
|
||||
for (auto it = m_pop_notifications.begin(); it != m_pop_notifications.end();) {
|
||||
std::unique_ptr<PopNotification> ¬ification = *it;
|
||||
if (notification->get_type() == type) {
|
||||
it = m_pop_notifications.erase(it);
|
||||
break;
|
||||
} else
|
||||
++it;
|
||||
}
|
||||
|
||||
@@ -68,10 +68,6 @@ private:
|
||||
CancelFn m_cancel_cb;
|
||||
};
|
||||
|
||||
namespace GUI {
|
||||
using Slic3r::ProgressStatusBar;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // PROGRESSSTATUSBAR_HPP
|
||||
|
||||
@@ -2928,7 +2928,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("skin_infill_line_width", "strength_settings_patterns#locked-zag");
|
||||
optgroup->append_single_option_line("skeleton_infill_line_width", "strength_settings_patterns#locked-zag");
|
||||
optgroup->append_single_option_line("symmetric_infill_y_axis", "strength_settings_infill#symmetric-infill-y-axis");
|
||||
optgroup->append_single_option_line("infill_complete_top", "strength_settings_infill#infill-complete-top");
|
||||
optgroup->append_single_option_line("infill_complete_top", "strength_settings_patterns#fill-pattern-tops");
|
||||
optgroup->append_single_option_line("infill_shift_step", "strength_settings_patterns#cross-hatch");
|
||||
optgroup->append_single_option_line("lateral_lattice_angle_1", "strength_settings_patterns#lateral-lattice");
|
||||
optgroup->append_single_option_line("lateral_lattice_angle_2", "strength_settings_patterns#lateral-lattice");
|
||||
|
||||
Reference in New Issue
Block a user