Move ConfigWizard instance in GUI_App, lazy-initialized,

add filament/material installation item in Sidebar combo boxes
This commit is contained in:
Vojtech Kral 2019-06-04 18:01:41 +02:00
parent 87b7b1cc1d
commit dba9925c4e
13 changed files with 115 additions and 85 deletions

View file

@ -6,6 +6,7 @@
#include "libslic3r/PrintConfig.hpp"
#include "MainFrame.hpp"
#include "ImGuiWrapper.hpp"
#include "ConfigWizard.hpp"
#include <wx/app.h>
#include <wx/colour.h>
@ -69,6 +70,7 @@ enum ConfigMenuIDs {
};
class Tab;
class ConfigWizard;
static wxString dots("", wxConvUTF8);
@ -96,6 +98,7 @@ class GUI_App : public wxApp
std::unique_ptr<ImGuiWrapper> m_imgui;
std::unique_ptr<PrintHostJobQueue> m_printhost_job_queue;
std::unique_ptr<ConfigWizard> m_wizard;
public:
bool OnInit() override;
@ -184,6 +187,7 @@ public:
PrintHostJobQueue& printhost_job_queue() { return *m_printhost_job_queue.get(); }
void open_web_page_localized(const std::string &http_address);
bool run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage start_page = ConfigWizard::SP_WELCOME);
private:
bool on_init_inner();
@ -191,6 +195,9 @@ private:
void window_pos_restore(wxTopLevelWindow* window, const std::string &name, bool default_maximized = false);
void window_pos_sanitize(wxTopLevelWindow* window);
bool select_language();
bool config_wizard_startup();
#ifdef __WXMSW__
void associate_3mf_files();
#endif // __WXMSW__