mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 00:16:04 +08:00
button enabling
This commit is contained in:
parent
a23964cf1b
commit
690126f674
@ -652,7 +652,8 @@ PageUpdateManager::PageUpdateManager(ConfigWizard* parent_in)
|
|||||||
const bool is_actual_archive_selection = wizard_p()->is_actual_archive_selection;
|
const bool is_actual_archive_selection = wizard_p()->is_actual_archive_selection;
|
||||||
const bool is_selection_changed = m_manager->is_selection_changed();
|
const bool is_selection_changed = m_manager->is_selection_changed();
|
||||||
const bool has_selections = m_manager->has_selections();
|
const bool has_selections = m_manager->has_selections();
|
||||||
event.Enable(!is_actual_archive_selection || (is_selection_changed && has_selections));
|
const bool is_config_from_archive = wizard_p()->is_config_from_archive;
|
||||||
|
event.Enable((!is_config_from_archive && has_selections) || !is_actual_archive_selection || (is_selection_changed && has_selections));
|
||||||
});
|
});
|
||||||
|
|
||||||
sizer->Add(btn, 0, wxALIGN_CENTER_HORIZONTAL | wxBOTTOM, em);
|
sizer->Add(btn, 0, wxALIGN_CENTER_HORIZONTAL | wxBOTTOM, em);
|
||||||
|
@ -311,7 +311,7 @@ ManagePresetRepositoriesDialog::ManagePresetRepositoriesDialog(PresetArchiveData
|
|||||||
|
|
||||||
|
|
||||||
buttons->GetAffirmativeButton()->Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& event) {
|
buttons->GetAffirmativeButton()->Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& event) {
|
||||||
event.Enable(m_manager->is_selection_changed() && m_manager->has_selections());
|
event.Enable(m_manager->has_selections());
|
||||||
});
|
});
|
||||||
|
|
||||||
SetSizer(sizer);
|
SetSizer(sizer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user