Perform init_vendors at startup

This commit is contained in:
Vojtech Kral 2018-04-11 15:20:38 +02:00
parent 31ea03feb0
commit 12b3132b1a
3 changed files with 3 additions and 3 deletions

View File

@ -101,6 +101,8 @@ sub OnInit {
$self->{app_config}->set('version', $Slic3r::VERSION); $self->{app_config}->set('version', $Slic3r::VERSION);
$self->{app_config}->save; $self->{app_config}->save;
Slic3r::PresetUpdater::init_vendors();
# my $version_check = $self->{app_config}->get('version_check'); # my $version_check = $self->{app_config}->get('version_check');
$self->{preset_updater} = Slic3r::PresetUpdater->new($VERSION_ONLINE_EVENT, $self->{app_config}); $self->{preset_updater} = Slic3r::PresetUpdater->new($VERSION_ONLINE_EVENT, $self->{app_config});
my $slic3r_update = $self->{app_config}->slic3r_update_avail; my $slic3r_update = $self->{app_config}->slic3r_update_avail;

View File

@ -700,9 +700,6 @@ ConfigWizard::~ConfigWizard() {}
bool ConfigWizard::run(wxWindow *parent, PresetBundle *preset_bundle) bool ConfigWizard::run(wxWindow *parent, PresetBundle *preset_bundle)
{ {
// FIXME: this should be done always at app startup
PresetUpdater::init_vendors();
ConfigWizard wizard(parent); ConfigWizard wizard(parent);
if (wizard.ShowModal() == wxID_OK) { if (wizard.ShowModal() == wxID_OK) {
wizard.p->apply_config(GUI::get_app_config(), preset_bundle); wizard.p->apply_config(GUI::get_app_config(), preset_bundle);

View File

@ -8,4 +8,5 @@
%name{Slic3r::PresetUpdater} class PresetUpdater { %name{Slic3r::PresetUpdater} class PresetUpdater {
PresetUpdater(int version_online_event, AppConfig *app_config); PresetUpdater(int version_online_event, AppConfig *app_config);
void download(PresetBundle* preset_bundle); void download(PresetBundle* preset_bundle);
static void init_vendors();
}; };