mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 23:30:38 +08:00
Fix:
./src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:1155:6: warning: ‘void {anonymous}::init_new_text_line(Slic3r::GUI::TextLinesModel&, const Transform3d&, const Slic3r::ModelObject&, Slic3r::GUI::Emboss::StyleManager&)’ defined but not used [-Wunused-function] ../src/slic3r/Utils/EmbossStyleManager.cpp:650:68: warning: ‘depth’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp:1169:17: warning: unused variable ‘data’ [-Wunused-variable]
This commit is contained in:
parent
de40cd6807
commit
1d2bc5afec
@ -1151,22 +1151,6 @@ void init_text_lines(TextLinesModel &text_lines, const Selection& selection, /*
|
|||||||
mv_trafo = mv_trafo * (es.fix_3mf_tr->inverse());
|
mv_trafo = mv_trafo * (es.fix_3mf_tr->inverse());
|
||||||
text_lines.init(mv_trafo, volumes, style_manager, count_lines);
|
text_lines.init(mv_trafo, volumes, style_manager, count_lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_new_text_line(TextLinesModel &text_lines, const Transform3d& new_text_tr, const ModelObject& mo, /* const*/ StyleManager &style_manager)
|
|
||||||
{
|
|
||||||
// prepare volumes to slice
|
|
||||||
ModelVolumePtrs volumes;
|
|
||||||
volumes.reserve(mo.volumes.size());
|
|
||||||
for (ModelVolume *volume : mo.volumes) {
|
|
||||||
// only part could be surface for volumes
|
|
||||||
if (!volume->is_model_part())
|
|
||||||
continue;
|
|
||||||
volumes.push_back(volume);
|
|
||||||
}
|
|
||||||
unsigned count_lines = 1;
|
|
||||||
text_lines.init(new_text_tr, volumes, style_manager, count_lines);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLGizmoEmboss::reinit_text_lines(unsigned count_lines) {
|
void GLGizmoEmboss::reinit_text_lines(unsigned count_lines) {
|
||||||
|
@ -1166,8 +1166,6 @@ bool GLGizmoSVG::process()
|
|||||||
|
|
||||||
void GLGizmoSVG::close()
|
void GLGizmoSVG::close()
|
||||||
{
|
{
|
||||||
ImDrawData *data = ImGui::GetDrawData();
|
|
||||||
|
|
||||||
// close gizmo == open it again
|
// close gizmo == open it again
|
||||||
auto &mng = m_parent.get_gizmos_manager();
|
auto &mng = m_parent.get_gizmos_manager();
|
||||||
if (mng.get_current_type() == GLGizmosManager::Svg)
|
if (mng.get_current_type() == GLGizmosManager::Svg)
|
||||||
|
@ -92,7 +92,7 @@ IconManager::Icons IconManager::init(const InitTypes &input)
|
|||||||
ImVector<stbrp_rect> pack_rects;
|
ImVector<stbrp_rect> pack_rects;
|
||||||
pack_rects.resize(input.size());
|
pack_rects.resize(input.size());
|
||||||
memset(pack_rects.Data, 0, (size_t) pack_rects.size_in_bytes());
|
memset(pack_rects.Data, 0, (size_t) pack_rects.size_in_bytes());
|
||||||
for (int i = 0; i < input.size(); i++) {
|
for (size_t i = 0; i < input.size(); i++) {
|
||||||
const ImVec2 &size = input[i].size;
|
const ImVec2 &size = input[i].size;
|
||||||
assert(size.x > 1);
|
assert(size.x > 1);
|
||||||
assert(size.y > 1);
|
assert(size.y > 1);
|
||||||
|
@ -645,9 +645,10 @@ std::optional<StyleManager::Style> load_style(const Section &app_cfg_section)
|
|||||||
const std::string default_name = "font_name";
|
const std::string default_name = "font_name";
|
||||||
s.name = (name_it == app_cfg_section.end()) ? default_name : name_it->second;
|
s.name = (name_it == app_cfg_section.end()) ? default_name : name_it->second;
|
||||||
|
|
||||||
float depth;
|
|
||||||
read(app_cfg_section, APP_CONFIG_FONT_LINE_HEIGHT, fp.size_in_mm);
|
read(app_cfg_section, APP_CONFIG_FONT_LINE_HEIGHT, fp.size_in_mm);
|
||||||
read(app_cfg_section, APP_CONFIG_FONT_DEPTH, depth);ep.depth = depth;
|
float depth = 1.;
|
||||||
|
read(app_cfg_section, APP_CONFIG_FONT_DEPTH, depth);
|
||||||
|
ep.depth = depth;
|
||||||
read(app_cfg_section, APP_CONFIG_FONT_USE_SURFACE, ep.use_surface);
|
read(app_cfg_section, APP_CONFIG_FONT_USE_SURFACE, ep.use_surface);
|
||||||
read(app_cfg_section, APP_CONFIG_FONT_BOLDNESS, fp.boldness);
|
read(app_cfg_section, APP_CONFIG_FONT_BOLDNESS, fp.boldness);
|
||||||
read(app_cfg_section, APP_CONFIG_FONT_SKEW, fp.skew);
|
read(app_cfg_section, APP_CONFIG_FONT_SKEW, fp.skew);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user