Fix usage of CallAfter vs modal dialogs in slic3r.cpp, fix #1778
This commit is contained in:
parent
4fc73965d3
commit
c3ea735bc8
3 changed files with 6 additions and 1 deletions
|
@ -131,6 +131,9 @@ int main(int argc, char **argv)
|
||||||
GUI::GUI_App *gui = new GUI::GUI_App();
|
GUI::GUI_App *gui = new GUI::GUI_App();
|
||||||
GUI::GUI_App::SetInstance(gui);
|
GUI::GUI_App::SetInstance(gui);
|
||||||
gui->CallAfter([gui, &input_files, &cli_config, &extra_config, &print_config] {
|
gui->CallAfter([gui, &input_files, &cli_config, &extra_config, &print_config] {
|
||||||
|
if (! gui->initialized()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
#if 0
|
#if 0
|
||||||
// Load the cummulative config over the currently active profiles.
|
// Load the cummulative config over the currently active profiles.
|
||||||
//FIXME if multiple configs are loaded, only the last one will have an effect.
|
//FIXME if multiple configs are loaded, only the last one will have an effect.
|
||||||
|
|
|
@ -197,7 +197,7 @@ bool GUI_App::OnInit()
|
||||||
|
|
||||||
|
|
||||||
mainframe->Show(true);
|
mainframe->Show(true);
|
||||||
return true;
|
return m_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned GUI_App::get_colour_approx_luma(const wxColour &colour)
|
unsigned GUI_App::get_colour_approx_luma(const wxColour &colour)
|
||||||
|
|
|
@ -71,6 +71,7 @@ static wxString dots("…", wxConvUTF8);
|
||||||
|
|
||||||
class GUI_App : public wxApp
|
class GUI_App : public wxApp
|
||||||
{
|
{
|
||||||
|
bool m_initialized { false };
|
||||||
bool app_conf_exists{ false };
|
bool app_conf_exists{ false };
|
||||||
|
|
||||||
wxColour m_color_label_modified;
|
wxColour m_color_label_modified;
|
||||||
|
@ -90,6 +91,7 @@ class GUI_App : public wxApp
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool OnInit() override;
|
bool OnInit() override;
|
||||||
|
bool initialized() const { return m_initialized; }
|
||||||
|
|
||||||
GUI_App();
|
GUI_App();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue