mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 12:05:54 +08:00
Create base struct separately and move to data
Fix for: ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:163:33: warning: suggest braces around initialization of subobject [-Wmissing-braces] ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:692:33: warning: suggest braces around initialization of subobject [-Wmissing-braces] ../src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp:788:27: warning: suggest braces around initialization of subobject [-Wmissing-braces]
This commit is contained in:
parent
3f4ea66721
commit
8d2487c721
@ -160,9 +160,8 @@ void GLGizmoEmboss::create_volume(ModelVolumeType volume_type, const Vec2d& mous
|
|||||||
if (m_font_manager.is_activ_font())
|
if (m_font_manager.is_activ_font())
|
||||||
font = m_font_manager.get_font().font_file_with_cache;
|
font = m_font_manager.get_font().font_file_with_cache;
|
||||||
|
|
||||||
EmbossDataCreateObject data{font,
|
EmbossDataBase base{font, create_configuration(), create_volume_name()};
|
||||||
create_configuration(),
|
EmbossDataCreateObject data{std::move(base),
|
||||||
create_volume_name(),
|
|
||||||
screen_coor,
|
screen_coor,
|
||||||
camera,
|
camera,
|
||||||
bed_shape};
|
bed_shape};
|
||||||
@ -694,9 +693,10 @@ bool GLGizmoEmboss::start_volume_creation(ModelVolumeType volume_type,
|
|||||||
|
|
||||||
// create volume
|
// create volume
|
||||||
auto &worker = plater->get_ui_job_worker();
|
auto &worker = plater->get_ui_job_worker();
|
||||||
EmbossDataCreateVolume data{m_font_manager.get_font().font_file_with_cache,
|
|
||||||
create_configuration(),
|
const Emboss::FontFileWithCache& font = m_font_manager.get_font().font_file_with_cache;
|
||||||
create_volume_name(),
|
EmbossDataBase base{font, create_configuration(), create_volume_name()};
|
||||||
|
EmbossDataCreateVolume data{std::move(base),
|
||||||
volume_type,
|
volume_type,
|
||||||
screen_coor,
|
screen_coor,
|
||||||
object_idx_signed,
|
object_idx_signed,
|
||||||
@ -789,9 +789,9 @@ bool GLGizmoEmboss::process()
|
|||||||
if (m_update_job_cancel != nullptr)
|
if (m_update_job_cancel != nullptr)
|
||||||
m_update_job_cancel->store(true);
|
m_update_job_cancel->store(true);
|
||||||
// create new shared ptr to cancel new job
|
// create new shared ptr to cancel new job
|
||||||
m_update_job_cancel = std::make_shared<std::atomic<bool> >(false);
|
m_update_job_cancel = std::make_shared<std::atomic<bool> >(false);
|
||||||
EmbossDataUpdate data{font, create_configuration(), create_volume_name(),
|
EmbossDataBase base{font, create_configuration(), create_volume_name()};
|
||||||
m_volume->id(), m_update_job_cancel};
|
EmbossDataUpdate data{std::move(base), m_volume->id(), m_update_job_cancel};
|
||||||
//*
|
//*
|
||||||
auto &worker = wxGetApp().plater()->get_ui_job_worker();
|
auto &worker = wxGetApp().plater()->get_ui_job_worker();
|
||||||
queue_job(worker, std::make_unique<EmbossUpdateJob>(std::move(data)));
|
queue_job(worker, std::make_unique<EmbossUpdateJob>(std::move(data)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user