- Un-select random sequence by default
- Added a check for interval height. It have to be bigger then print layer height
This commit is contained in:
YuSanka 2021-06-16 18:20:26 +02:00
parent 2e54648b97
commit c5cb94d92c
2 changed files with 8 additions and 2 deletions

View file

@ -146,7 +146,7 @@ struct ExtrudersSequence
bool is_mm_intervals = true;
double interval_by_mm = 3.0;
int interval_by_layers = 10;
bool random_sequence { true };
bool random_sequence { false };
bool color_repetition { false };
std::vector<size_t> extruders = { 0 };

View file

@ -91,7 +91,8 @@ ExtruderSequenceDialog::ExtruderSequenceDialog(const DoubleSlider::ExtrudersSequ
double_to_string(sequence.interval_by_mm),
wxDefaultPosition, editor_sz, wxTE_PROCESS_ENTER);
auto change_value = [this]()
double min_layer_height = wxGetApp().preset_bundle->prints.get_edited_preset().config.opt_float("layer_height");
auto change_value = [this, min_layer_height]()
{
wxString str = m_interval_by_mm->GetValue();
if (str.IsEmpty()) {
@ -112,6 +113,11 @@ ExtruderSequenceDialog::ExtruderSequenceDialog(const DoubleSlider::ExtrudersSequ
if (fabs(m_sequence.interval_by_layers - val) < 0.001)
return;
if (val < min_layer_height) {
val = min_layer_height;
m_interval_by_mm->SetValue(double_to_string(val, 2));
}
m_sequence.interval_by_mm = val;
};