mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-12 11:37:42 +00:00
Allow model to be Published without any settings modified
This commit is contained in:
@@ -165,16 +165,9 @@ PublishSettingsDialog::PublishSettingsDialog(wxWindow* parent)
|
|||||||
auto dlg_btns = new DialogButtons(this, {"OK", "Cancel"});
|
auto dlg_btns = new DialogButtons(this, {"OK", "Cancel"});
|
||||||
|
|
||||||
dlg_btns->GetOK()->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {
|
dlg_btns->GetOK()->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {
|
||||||
// At least one checked, enabled (publishable) key is required. A gated
|
// Publish is always allowed: no settings selected means a publish with
|
||||||
// material row is disabled even if its value is pre-checked, so it must
|
// no settings override.
|
||||||
// not count.
|
|
||||||
for (const Row& row : m_rows)
|
|
||||||
if (row.check->GetValue() && row.check->IsEnabled()) {
|
|
||||||
EndModal(wxID_OK);
|
EndModal(wxID_OK);
|
||||||
return;
|
|
||||||
}
|
|
||||||
MessageDialog(this, _L("No settings selected. Please select at least one setting to publish."), _L("Publish"), wxOK | wxICON_WARNING)
|
|
||||||
.ShowModal();
|
|
||||||
});
|
});
|
||||||
dlg_btns->GetCANCEL()->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { EndModal(wxID_CANCEL); });
|
dlg_btns->GetCANCEL()->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) { EndModal(wxID_CANCEL); });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user