mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 15:13:58 -06:00
Merge remote-tracking branch 'remotes/origin/vb_undo_redo'
This commit is contained in:
commit
ab7ecc1819
60 changed files with 2799 additions and 578 deletions
|
@ -379,7 +379,7 @@ bool GLGizmoSlaSupports::is_point_clipped(const Vec3d& point) const
|
|||
bool GLGizmoSlaSupports::is_mesh_update_necessary() const
|
||||
{
|
||||
return ((m_state == On) && (m_model_object != nullptr) && !m_model_object->instances.empty())
|
||||
&& ((m_model_object->id() != m_current_mesh_model_id) || m_its == nullptr);
|
||||
&& ((m_model_object->id() != m_current_mesh_object_id) || m_its == nullptr);
|
||||
}
|
||||
|
||||
void GLGizmoSlaSupports::update_mesh()
|
||||
|
@ -389,7 +389,7 @@ void GLGizmoSlaSupports::update_mesh()
|
|||
// This mesh does not account for the possible Z up SLA offset.
|
||||
m_mesh = &m_model_object->volumes.front()->mesh();
|
||||
m_its = &m_mesh->its;
|
||||
m_current_mesh_model_id = m_model_object->id();
|
||||
m_current_mesh_object_id = m_model_object->id();
|
||||
m_editing_mode = false;
|
||||
|
||||
m_AABB.deinit();
|
||||
|
@ -923,10 +923,12 @@ RENDER_AGAIN:
|
|||
}
|
||||
|
||||
if (value_changed) { // Update side panel
|
||||
wxTheApp->CallAfter([]() {
|
||||
wxGetApp().obj_settings()->UpdateAndShow(true);
|
||||
wxGetApp().obj_list()->update_settings_items();
|
||||
});
|
||||
/* wxTheApp->CallAfter([]() {
|
||||
* wxGetApp().obj_settings()->UpdateAndShow(true);
|
||||
* wxGetApp().obj_list()->update_settings_items();
|
||||
* });
|
||||
* #lm_FIXME_delete_after_testing */
|
||||
wxGetApp().obj_list()->update_and_show_object_settings_item();
|
||||
}
|
||||
|
||||
bool generate = m_imgui->button(m_desc.at("auto_generate"));
|
||||
|
|
|
@ -26,7 +26,7 @@ class GLGizmoSlaSupports : public GLGizmoBase
|
|||
{
|
||||
private:
|
||||
ModelObject* m_model_object = nullptr;
|
||||
ModelID m_current_mesh_model_id = 0;
|
||||
ObjectID m_current_mesh_object_id = 0;
|
||||
int m_active_instance = -1;
|
||||
float m_active_instance_bb_radius; // to cache the bb
|
||||
mutable float m_z_shift = 0.f;
|
||||
|
|
|
@ -542,8 +542,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt, GLCanvas3D& canvas)
|
|||
if (m_current == Flatten)
|
||||
{
|
||||
// Rotate the object so the normal points downward:
|
||||
selection.flattening_rotate(get_flattening_normal());
|
||||
canvas.do_flatten();
|
||||
canvas.do_flatten(get_flattening_normal(), "Place on Face");
|
||||
wxGetApp().obj_manipul()->set_dirty();
|
||||
}
|
||||
|
||||
|
@ -616,17 +615,17 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt, GLCanvas3D& canvas)
|
|||
case Move:
|
||||
{
|
||||
canvas.disable_regenerate_volumes();
|
||||
canvas.do_move();
|
||||
canvas.do_move("Gizmo-Move Object");
|
||||
break;
|
||||
}
|
||||
case Scale:
|
||||
{
|
||||
canvas.do_scale();
|
||||
canvas.do_scale("Gizmo-Scale Object");
|
||||
break;
|
||||
}
|
||||
case Rotate:
|
||||
{
|
||||
canvas.do_rotate();
|
||||
canvas.do_rotate("Gizmo-Rotate Object");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue