mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-06-07 22:49:15 -07:00
Fixed update on reset of the variable layer height profile.
Fixed update of the layer height profile on PrintObject when changing profiles. Fixed crash due to the layer height editing refactoring & wipe tower.
This commit is contained in:
@@ -1179,11 +1179,12 @@ void GLCanvas3D::LayersEditing::adjust_layer_height_profile()
|
||||
m_layers_texture.valid = false;
|
||||
}
|
||||
|
||||
void GLCanvas3D::LayersEditing::reset_layer_height_profile()
|
||||
void GLCanvas3D::LayersEditing::reset_layer_height_profile(GLCanvas3D& canvas)
|
||||
{
|
||||
const_cast<ModelObject*>(m_model_object)->layer_height_profile.clear();
|
||||
m_layer_height_profile.clear();
|
||||
m_layers_texture.valid = false;
|
||||
canvas.post_event(SimpleEvent(EVT_GLCANVAS_SCHEDULE_BACKGROUND_PROCESS));
|
||||
}
|
||||
|
||||
void GLCanvas3D::LayersEditing::generate_layer_height_texture()
|
||||
@@ -5117,7 +5118,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||
if (evt.LeftDown())
|
||||
{
|
||||
// A volume is selected and the mouse is inside the reset button. Reset the ModelObject's layer height profile.
|
||||
m_layers_editing.reset_layer_height_profile();
|
||||
m_layers_editing.reset_layer_height_profile(*this);
|
||||
// Index 2 means no editing, just wait for mouse up event.
|
||||
m_layers_editing.state = LayersEditing::Completed;
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ class GLCanvas3D
|
||||
|
||||
void adjust_layer_height_profile();
|
||||
void accept_changes(GLCanvas3D& canvas);
|
||||
void reset_layer_height_profile();
|
||||
void reset_layer_height_profile(GLCanvas3D& canvas);
|
||||
|
||||
static float get_cursor_z_relative(const GLCanvas3D& canvas);
|
||||
static bool bar_rect_contains(const GLCanvas3D& canvas, float x, float y);
|
||||
|
||||
Reference in New Issue
Block a user