Postpone post_init() until opengl is initialized on all systems.
Revert on win
This commit is contained in:
parent
e09bdef952
commit
dfe735fb6c
@ -887,13 +887,9 @@ wxGLContext* GUI_App::init_glcontext(wxGLCanvas& canvas)
|
||||
|
||||
bool GUI_App::init_opengl()
|
||||
{
|
||||
#ifdef __linux__
|
||||
bool status = m_opengl_mgr.init_gl();
|
||||
m_opengl_initialized = true;
|
||||
return status;
|
||||
#else
|
||||
return m_opengl_mgr.init_gl();
|
||||
#endif
|
||||
}
|
||||
|
||||
// gets path to PrusaSlicer.ini, returns semver from first line comment
|
||||
@ -1370,12 +1366,15 @@ bool GUI_App::on_init_inner()
|
||||
|
||||
// An ugly solution to GH #5537 in which GUI_App::init_opengl (normally called from events wxEVT_PAINT
|
||||
// and wxEVT_SET_FOCUS before GUI_App::post_init is called) wasn't called before GUI_App::post_init and OpenGL wasn't initialized.
|
||||
#ifdef __linux__
|
||||
if (! m_post_initialized && m_opengl_initialized) {
|
||||
// Since issue #9774 Where same problem occured on MacOS Ventura, we decided to have this check on MacOS as well.
|
||||
|
||||
#ifdef __linux__ || __APPLE__
|
||||
if (!m_post_initialized && m_opengl_initialized) {
|
||||
#else
|
||||
if (! m_post_initialized) {
|
||||
if (!m_post_initialized) {
|
||||
#endif
|
||||
m_post_initialized = true;
|
||||
|
||||
#ifdef WIN32
|
||||
this->mainframe->register_win32_callbacks();
|
||||
#endif
|
||||
|
@ -127,9 +127,7 @@ private:
|
||||
bool m_last_app_conf_lower_version{ false };
|
||||
EAppMode m_app_mode{ EAppMode::Editor };
|
||||
bool m_is_recreating_gui{ false };
|
||||
#ifdef __linux__
|
||||
bool m_opengl_initialized{ false };
|
||||
#endif
|
||||
|
||||
wxColour m_color_label_modified;
|
||||
wxColour m_color_label_sys;
|
||||
|
Loading…
Reference in New Issue
Block a user