mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-16 15:33:13 +08:00
Perform update in preset archive DB only, when selections in ManagePresetRepositoriesDialog was changed and confirmed
This commit is contained in:
parent
c325bb0629
commit
a23964cf1b
@ -3445,12 +3445,6 @@ bool GUI_App::config_wizard_startup()
|
||||
return false;
|
||||
}
|
||||
|
||||
void GUI_App::manage_preset_repositiories()
|
||||
{
|
||||
ManagePresetRepositoriesDialog dlg(plater()->get_preset_archive_database());
|
||||
dlg.ShowModal();
|
||||
}
|
||||
|
||||
bool GUI_App::check_updates(const bool invoked_automatically)
|
||||
{
|
||||
// verbose means - not run after startup, but by user
|
||||
@ -3459,7 +3453,9 @@ bool GUI_App::check_updates(const bool invoked_automatically)
|
||||
// for preset_updater sync we need to sync archive database first
|
||||
plater()->get_preset_archive_database()->sync_blocking();
|
||||
// and we can have user to select the repos they want (thats additional dialog)
|
||||
manage_preset_repositiories();
|
||||
ManagePresetRepositoriesDialog dlg(plater()->get_preset_archive_database());
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return true;
|
||||
// then its time for preset_updater sync
|
||||
preset_updater->sync_blocking(preset_bundle, this, plater()->get_preset_archive_database()->get_archive_repositories(), plater()->get_preset_archive_database()->get_selected_repositories_uuid());
|
||||
// and then we check updates
|
||||
|
@ -440,7 +440,6 @@ private:
|
||||
bool select_language();
|
||||
|
||||
bool config_wizard_startup();
|
||||
void manage_preset_repositiories();
|
||||
// Returns true if the configuration is fine.
|
||||
// Returns true if the configuration is not compatible and the user decided to rather close the slicer instead of reconfiguring.
|
||||
bool check_updates(const bool invoked_automatically);
|
||||
|
@ -333,7 +333,7 @@ void ManagePresetRepositoriesDialog::onCloseDialog(wxEvent &)
|
||||
void ManagePresetRepositoriesDialog::onOkDialog(wxEvent&)
|
||||
{
|
||||
if (m_manager->set_selected_repositories())
|
||||
this->EndModal(wxID_CLOSE);
|
||||
this->EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
} // namespace GUI
|
||||
|
Loading…
x
Reference in New Issue
Block a user