mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-08 07:29:09 +08:00
Call schedule_background_process() after rotating/scaling/flattening using gizmos
This commit is contained in:
parent
30fe846158
commit
c00ee0659e
@ -2699,6 +2699,7 @@ void GLCanvas3D::LegendTexture::render(const GLCanvas3D& canvas) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxDEFINE_EVENT(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent);
|
||||||
#if ENABLE_EXTENDED_SELECTION
|
#if ENABLE_EXTENDED_SELECTION
|
||||||
wxDEFINE_EVENT(EVT_GLCANVAS_OBJECT_SELECT, SimpleEvent);
|
wxDEFINE_EVENT(EVT_GLCANVAS_OBJECT_SELECT, SimpleEvent);
|
||||||
#else
|
#else
|
||||||
@ -6547,7 +6548,7 @@ void GLCanvas3D::_on_rotate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// schedule_background_process
|
post_event(SimpleEvent(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLCanvas3D::_on_scale()
|
void GLCanvas3D::_on_scale()
|
||||||
@ -6581,7 +6582,7 @@ void GLCanvas3D::_on_scale()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// schedule_background_process
|
post_event(SimpleEvent(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLCanvas3D::_on_flatten()
|
void GLCanvas3D::_on_flatten()
|
||||||
@ -6621,7 +6622,7 @@ void GLCanvas3D::_on_mirror()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// schedule_background_process
|
post_event(SimpleEvent(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS));
|
||||||
}
|
}
|
||||||
#endif // ENABLE_MIRROR
|
#endif // ENABLE_MIRROR
|
||||||
#else
|
#else
|
||||||
|
@ -104,7 +104,7 @@ template <size_t N> using Vec2dsEvent = ArrayEvent<Vec2d, N>;
|
|||||||
using Vec3dEvent = Event<Vec3d>;
|
using Vec3dEvent = Event<Vec3d>;
|
||||||
template <size_t N> using Vec3dsEvent = ArrayEvent<Vec3d, N>;
|
template <size_t N> using Vec3dsEvent = ArrayEvent<Vec3d, N>;
|
||||||
|
|
||||||
|
wxDECLARE_EVENT(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, SimpleEvent);
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_VIEWPORT_CHANGED, SimpleEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_VIEWPORT_CHANGED, SimpleEvent);
|
||||||
#if !ENABLE_EXTENDED_SELECTION
|
#if !ENABLE_EXTENDED_SELECTION
|
||||||
wxDECLARE_EVENT(EVT_GLCANVAS_DOUBLE_CLICK, SimpleEvent);
|
wxDECLARE_EVENT(EVT_GLCANVAS_DOUBLE_CLICK, SimpleEvent);
|
||||||
@ -732,6 +732,7 @@ private:
|
|||||||
|
|
||||||
void post_event(wxEvent &&event);
|
void post_event(wxEvent &&event);
|
||||||
void viewport_changed();
|
void viewport_changed();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GLCanvas3D(wxGLCanvas* canvas);
|
GLCanvas3D(wxGLCanvas* canvas);
|
||||||
~GLCanvas3D();
|
~GLCanvas3D();
|
||||||
|
@ -822,6 +822,8 @@ struct Plater::priv
|
|||||||
void on_process_completed(wxCommandEvent&);
|
void on_process_completed(wxCommandEvent&);
|
||||||
void on_layer_editing_toggled(bool enable);
|
void on_layer_editing_toggled(bool enable);
|
||||||
|
|
||||||
|
void on_schedule_background_process(SimpleEvent&);
|
||||||
|
|
||||||
void on_action_add(SimpleEvent&);
|
void on_action_add(SimpleEvent&);
|
||||||
void on_action_split_objects(SimpleEvent&);
|
void on_action_split_objects(SimpleEvent&);
|
||||||
void on_action_split_volumes(SimpleEvent&);
|
void on_action_split_volumes(SimpleEvent&);
|
||||||
@ -946,6 +948,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) :
|
|||||||
sidebar->Bind(wxEVT_COMBOBOX, &priv::on_select_preset, this);
|
sidebar->Bind(wxEVT_COMBOBOX, &priv::on_select_preset, this);
|
||||||
|
|
||||||
// 3DScene events:
|
// 3DScene events:
|
||||||
|
canvas3D->Bind(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS, &priv::on_schedule_background_process, this);
|
||||||
canvas3D->Bind(EVT_GLCANVAS_OBJECT_SELECT, &priv::on_object_select, this);
|
canvas3D->Bind(EVT_GLCANVAS_OBJECT_SELECT, &priv::on_object_select, this);
|
||||||
canvas3D->Bind(EVT_GLCANVAS_VIEWPORT_CHANGED, &priv::on_viewport_changed, this);
|
canvas3D->Bind(EVT_GLCANVAS_VIEWPORT_CHANGED, &priv::on_viewport_changed, this);
|
||||||
#if !ENABLE_EXTENDED_SELECTION
|
#if !ENABLE_EXTENDED_SELECTION
|
||||||
@ -1867,6 +1870,11 @@ void Plater::priv::on_layer_editing_toggled(bool enable)
|
|||||||
canvas3D->Update();
|
canvas3D->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Plater::priv::on_schedule_background_process(SimpleEvent&)
|
||||||
|
{
|
||||||
|
schedule_background_process();
|
||||||
|
}
|
||||||
|
|
||||||
void Plater::priv::on_action_add(SimpleEvent&)
|
void Plater::priv::on_action_add(SimpleEvent&)
|
||||||
{
|
{
|
||||||
if (q != nullptr)
|
if (q != nullptr)
|
||||||
|
@ -89,7 +89,6 @@ private:
|
|||||||
std::unique_ptr<priv> p;
|
std::unique_ptr<priv> p;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Plater: public wxPanel
|
class Plater: public wxPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user