Activate the driver when getting a show event, and clear the GUI Editor display widget when there's no GUI loaded.
This commit is contained in:
parent
8d9db85a7f
commit
167f39b494
3 changed files with 13 additions and 0 deletions
|
@ -102,6 +102,13 @@ namespace GUIEditor
|
||||||
driver->swapBuffers();
|
driver->swapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Nel3DWidget::showEvent( QShowEvent *evnt )
|
||||||
|
{
|
||||||
|
QWidget::showEvent( evnt );
|
||||||
|
|
||||||
|
if( driver != NULL )
|
||||||
|
driver->activate();
|
||||||
|
}
|
||||||
|
|
||||||
#if defined ( NL_OS_WINDOWS )
|
#if defined ( NL_OS_WINDOWS )
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ namespace GUIEditor
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
void showEvent( QShowEvent *evnt );
|
||||||
|
|
||||||
#if defined(NL_OS_WINDOWS)
|
#if defined(NL_OS_WINDOWS)
|
||||||
virtual bool winEvent( MSG *message, long *result );
|
virtual bool winEvent( MSG *message, long *result );
|
||||||
#elif defined(NL_OS_MAC)
|
#elif defined(NL_OS_MAC)
|
||||||
|
|
|
@ -153,6 +153,10 @@ namespace GUIEditor
|
||||||
w->getDriver()->EventServer.pump();
|
w->getDriver()->EventServer.pump();
|
||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
w->clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue