Skip to content
Snippets Groups Projects

MainWindow: Addend bandage fix to keep MainWindow open when the docked OpenGl...

Merged Ludwig Jaeck requested to merge 432-glcontext into main
  1. Feb 14, 2023
    • Ludwig Jaeck's avatar
      MainWindow: fix window redraw after new project · b6604a7a
      Ludwig Jaeck authored
      Canvas is not initialized in application start so a window manager like x11 may reopen the mainwindow on gl context switching without this fix.
      
      The behaviour was caused by different surface format / opengl contexts of the QMainWindow instance and the QOpenGLWidget instance of Canvas. In Qt6 it became more complex to quickly share the gl context. Hence we just create a dummy QOpenGLWidget before MainWindow is show to reset it.
      b6604a7a
Loading