mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-15 20:23:47 +00:00
FIXED: #1471 The rendered image should no longer disappear from NelGUI widget, when resizing another widget.
This commit is contained in:
parent
0316e0bce9
commit
159deeaab8
4 changed files with 47 additions and 28 deletions
|
@ -29,6 +29,11 @@ namespace GUIEditor
|
|||
{
|
||||
driver = NULL;
|
||||
textContext = NULL;
|
||||
|
||||
// Need to set this attribute with a NULL paintengine returned to Qt
|
||||
// so that we can render the widget normally ourselves, without the image
|
||||
// disappearing when a widget is resized or shown on top of us
|
||||
setAttribute( Qt::WA_PaintOnScreen, true );
|
||||
}
|
||||
|
||||
Nel3DWidget::~Nel3DWidget()
|
||||
|
|
|
@ -43,6 +43,12 @@ namespace GUIEditor
|
|||
NL3D::UDriver* getDriver() const{ return driver; }
|
||||
NL3D::UTextContext* getTextContext() const{ return textContext; }
|
||||
|
||||
|
||||
// Need to return NULL paintengine to Qt so that we can
|
||||
// render the widget normally ourselves, without the image
|
||||
// disappearing when a widget is resized or shown on top of us
|
||||
QPaintEngine* paintEngine() const{ return NULL; }
|
||||
|
||||
public Q_SLOTS:
|
||||
void clear();
|
||||
|
||||
|
|
|
@ -96,5 +96,10 @@ namespace GUIEditor
|
|||
CWidgetManager::getInstance()->drawViews( 0 );
|
||||
getDriver()->swapBuffers();
|
||||
}
|
||||
|
||||
void NelGUIWidget::paintEvent( QPaintEvent *evnt )
|
||||
{
|
||||
draw();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,6 +35,9 @@ namespace GUIEditor
|
|||
bool parse( SProjectFiles &files );
|
||||
void draw();
|
||||
|
||||
protected:
|
||||
void paintEvent( QPaintEvent *evnt );
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue