diff --git a/code/studio/src/plugins/gui_editor/nel3d_widget.cpp b/code/studio/src/plugins/gui_editor/nel3d_widget.cpp index 5be8bacb8..1e030db25 100644 --- a/code/studio/src/plugins/gui_editor/nel3d_widget.cpp +++ b/code/studio/src/plugins/gui_editor/nel3d_widget.cpp @@ -102,6 +102,13 @@ namespace GUIEditor driver->swapBuffers(); } + void Nel3DWidget::showEvent( QShowEvent *evnt ) + { + QWidget::showEvent( evnt ); + + if( driver != NULL ) + driver->activate(); + } #if defined ( NL_OS_WINDOWS ) diff --git a/code/studio/src/plugins/gui_editor/nel3d_widget.h b/code/studio/src/plugins/gui_editor/nel3d_widget.h index 07a74b8c3..e2d5f00b6 100644 --- a/code/studio/src/plugins/gui_editor/nel3d_widget.h +++ b/code/studio/src/plugins/gui_editor/nel3d_widget.h @@ -55,6 +55,8 @@ namespace GUIEditor protected: + void showEvent( QShowEvent *evnt ); + #if defined(NL_OS_WINDOWS) virtual bool winEvent( MSG *message, long *result ); #elif defined(NL_OS_MAC) diff --git a/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp index 4e72ba614..72bb9524f 100644 --- a/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp +++ b/code/studio/src/plugins/gui_editor/nelgui_ctrl.cpp @@ -153,6 +153,10 @@ namespace GUIEditor w->getDriver()->EventServer.pump(); draw(); } + else + { + w->clear(); + } } }