mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-25 18:00:57 +00:00
sublayers and more
This commit is contained in:
@@ -472,6 +472,32 @@ PlateSettingsDialog::PlateSettingsDialog(wxWindow* parent, const wxString& title
|
||||
m_sizer_main->AddSpacer(FromDIP(5));
|
||||
m_sizer_main->Add(m_other_layers_seq_panel, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(30));
|
||||
|
||||
// A mixed-color slot resolves to a different physical filament per layer, so a user-defined
|
||||
// filament order cannot be honoured. Disable the choice and say why. BBS puts this warning
|
||||
// inside its button sizer; Orca builds the buttons with DialogButtons, so it gets its own row.
|
||||
{
|
||||
auto &proj_cfg = wxGetApp().preset_bundle->project_config;
|
||||
auto *is_mixed_opt = proj_cfg.option<ConfigOptionBools>("filament_is_mixed");
|
||||
if (is_mixed_opt && Slic3r::has_any_mixed_filament(is_mixed_opt->values)) {
|
||||
m_first_layer_print_seq_choice->Enable(false);
|
||||
m_other_layers_seq_panel->enable_seq_choice(false);
|
||||
|
||||
auto *warn_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto *warn_icon = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("warning", this, 16),
|
||||
wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)));
|
||||
auto *warn_text = new wxStaticText(this, wxID_ANY,
|
||||
_L("The filament list contains mixed filaments. Custom filament sequence will not take effect."));
|
||||
warn_text->SetForegroundColour(wxColour(255, 111, 0));
|
||||
warn_text->SetFont(Label::Body_12);
|
||||
warn_text->Wrap(FromDIP(300));
|
||||
|
||||
warn_sizer->Add(warn_icon, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(5));
|
||||
warn_sizer->Add(warn_text, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
m_sizer_main->AddSpacer(FromDIP(5));
|
||||
m_sizer_main->Add(warn_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(30));
|
||||
}
|
||||
}
|
||||
|
||||
auto dlg_btns = new DialogButtons(this, {"OK", "Cancel"});
|
||||
|
||||
dlg_btns->GetOK()->Bind(wxEVT_BUTTON, [this](auto& e) {
|
||||
|
||||
Reference in New Issue
Block a user