mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Merge branch 'master' of https://github.com/prusa3d/Slic3r into et_canvas_gui_refactoring
This commit is contained in:
commit
6d9180ba92
26 changed files with 348 additions and 68 deletions
|
@ -109,21 +109,26 @@ void Selection::add(unsigned int volume_idx, bool as_single_selection)
|
|||
if (is_wipe_tower() && volume->is_wipe_tower)
|
||||
return;
|
||||
|
||||
bool keep_instance_mode = (m_mode == Instance) && !as_single_selection && (is_single_full_instance() || is_multiple_full_instance());
|
||||
|
||||
// resets the current list if needed
|
||||
bool needs_reset = as_single_selection;
|
||||
needs_reset |= volume->is_wipe_tower;
|
||||
needs_reset |= is_wipe_tower() && !volume->is_wipe_tower;
|
||||
needs_reset |= !is_modifier() && volume->is_modifier;
|
||||
needs_reset |= !keep_instance_mode && !is_modifier() && volume->is_modifier;
|
||||
needs_reset |= is_modifier() && !volume->is_modifier;
|
||||
|
||||
if (needs_reset)
|
||||
clear();
|
||||
|
||||
if (!contains_volume(volume_idx))
|
||||
m_mode = volume->is_modifier ? Volume : Instance;
|
||||
{
|
||||
if (!keep_instance_mode)
|
||||
m_mode = volume->is_modifier ? Volume : Instance;
|
||||
}
|
||||
else
|
||||
// keep current mode
|
||||
return;
|
||||
// keep current mode
|
||||
return;
|
||||
|
||||
switch (m_mode)
|
||||
{
|
||||
|
@ -1143,16 +1148,12 @@ void Selection::update_type()
|
|||
}
|
||||
|
||||
if (modifiers_count == 0)
|
||||
{
|
||||
m_type = MultipleVolume;
|
||||
requires_disable = true;
|
||||
}
|
||||
else if (modifiers_count == (unsigned int)m_list.size())
|
||||
{
|
||||
m_type = MultipleModifier;
|
||||
requires_disable = true;
|
||||
}
|
||||
}
|
||||
|
||||
requires_disable = true;
|
||||
}
|
||||
else if ((selected_instances_count > 1) && (selected_instances_count * volumes_count == (unsigned int)m_list.size()))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue