mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-21 20:18:17 +08:00
Added missed update for a config after extruder change from the ObjectList.
Fixed erase "tool_change" ticks from ticks set.
This commit is contained in:
parent
519291394a
commit
74e4a743af
@ -917,6 +917,7 @@ void ObjectList::extruder_editing()
|
|||||||
m_objects_model->SetExtruder(m_extruder_editor->GetString(selection), item);
|
m_objects_model->SetExtruder(m_extruder_editor->GetString(selection), item);
|
||||||
|
|
||||||
m_extruder_editor->Hide();
|
m_extruder_editor->Hide();
|
||||||
|
update_extruder_in_config(item);
|
||||||
};
|
};
|
||||||
|
|
||||||
// to avoid event propagation to other sidebar items
|
// to avoid event propagation to other sidebar items
|
||||||
|
@ -3744,10 +3744,19 @@ void DoubleSlider::edit_extruder_sequence()
|
|||||||
if (dlg.ShowModal() != wxID_OK)
|
if (dlg.ShowModal() != wxID_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_extruders_sequence = dlg.GetValue();
|
const ExtrudersSequence& from_dlg_val = dlg.GetValue();
|
||||||
|
if (m_extruders_sequence == from_dlg_val)
|
||||||
|
return;
|
||||||
|
|
||||||
m_ticks_.erase(std::remove_if(m_ticks_.begin(), m_ticks_.end(),
|
m_extruders_sequence = from_dlg_val;
|
||||||
[](TICK_CODE tick) { return tick.gcode == Slic3r::ExtruderChangeCode; }), m_ticks_.end());
|
|
||||||
|
auto it = m_ticks_.begin();
|
||||||
|
while (it != m_ticks_.end()) {
|
||||||
|
if (it->gcode == Slic3r::ExtruderChangeCode)
|
||||||
|
it = m_ticks_.erase(it);
|
||||||
|
else
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
|
||||||
int tick = 0;
|
int tick = 0;
|
||||||
double value = 0.0;
|
double value = 0.0;
|
||||||
|
@ -1014,6 +1014,20 @@ public:
|
|||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
bool operator==(const ExtrudersSequence& other) const
|
||||||
|
{
|
||||||
|
return (other.is_mm_intervals == this->is_mm_intervals ) &&
|
||||||
|
(other.interval_by_mm == this->interval_by_mm ) &&
|
||||||
|
(other.interval_by_layers == this->interval_by_layers ) &&
|
||||||
|
(other.extruders == this->extruders ) ;
|
||||||
|
}
|
||||||
|
bool operator!=(const ExtrudersSequence& other) const
|
||||||
|
{
|
||||||
|
return (other.is_mm_intervals != this->is_mm_intervals ) &&
|
||||||
|
(other.interval_by_mm != this->interval_by_mm ) &&
|
||||||
|
(other.interval_by_layers != this->interval_by_layers ) &&
|
||||||
|
(other.extruders != this->extruders ) ;
|
||||||
|
}
|
||||||
|
|
||||||
void add_extruder(size_t pos)
|
void add_extruder(size_t pos)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user