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
3 changed files with 27 additions and 3 deletions
|
@ -917,6 +917,7 @@ void ObjectList::extruder_editing()
|
|||
m_objects_model->SetExtruder(m_extruder_editor->GetString(selection), item);
|
||||
|
||||
m_extruder_editor->Hide();
|
||||
update_extruder_in_config(item);
|
||||
};
|
||||
|
||||
// to avoid event propagation to other sidebar items
|
||||
|
|
|
@ -3744,10 +3744,19 @@ void DoubleSlider::edit_extruder_sequence()
|
|||
if (dlg.ShowModal() != wxID_OK)
|
||||
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(),
|
||||
[](TICK_CODE tick) { return tick.gcode == Slic3r::ExtruderChangeCode; }), m_ticks_.end());
|
||||
m_extruders_sequence = from_dlg_val;
|
||||
|
||||
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;
|
||||
double value = 0.0;
|
||||
|
|
|
@ -1014,6 +1014,20 @@ public:
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue