mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
SLA gizmo cannot be activated for objects outside the bed
This commit is contained in:
parent
023b788777
commit
3c7912186e
1 changed files with 16 additions and 5 deletions
|
@ -2250,12 +2250,14 @@ RENDER_AGAIN:
|
||||||
force_refresh |= (old_combo_state != m_combo_box_open);
|
force_refresh |= (old_combo_state != m_combo_box_open);
|
||||||
|
|
||||||
float current_number = atof(str);
|
float current_number = atof(str);
|
||||||
if (std::abs(current_number - m_new_point_head_diameter) > 0.001) {
|
if (old_combo_state && !m_combo_box_open) // closing the combo must always change the sizes (even if the selection did not change)
|
||||||
force_refresh = true;
|
|
||||||
m_new_point_head_diameter = current_number;
|
|
||||||
for (auto& point_and_selection : m_editing_mode_cache)
|
for (auto& point_and_selection : m_editing_mode_cache)
|
||||||
if (point_and_selection.second)
|
if (point_and_selection.second)
|
||||||
point_and_selection.first.head_front_radius = current_number / 2.f;
|
point_and_selection.first.head_front_radius = current_number / 2.f;
|
||||||
|
|
||||||
|
if (std::abs(current_number - m_new_point_head_diameter) > 0.001) {
|
||||||
|
force_refresh = true;
|
||||||
|
m_new_point_head_diameter = current_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool changed = m_lock_unique_islands;
|
bool changed = m_lock_unique_islands;
|
||||||
|
@ -2376,8 +2378,17 @@ RENDER_AGAIN:
|
||||||
|
|
||||||
bool GLGizmoSlaSupports::on_is_activable(const GLCanvas3D::Selection& selection) const
|
bool GLGizmoSlaSupports::on_is_activable(const GLCanvas3D::Selection& selection) const
|
||||||
{
|
{
|
||||||
return (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA)
|
if (wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() != ptSLA
|
||||||
&& selection.is_from_single_instance();
|
|| !selection.is_from_single_instance())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Check that none of the selected volumes is outside.
|
||||||
|
const GLCanvas3D::Selection::IndicesList& list = selection.get_volume_idxs();
|
||||||
|
for (const auto& idx : list)
|
||||||
|
if (selection.get_volume(idx)->is_outside)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GLGizmoSlaSupports::on_is_selectable() const
|
bool GLGizmoSlaSupports::on_is_selectable() const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue