forked from Mirrors/openclonk
Update the Qt rendering widget periodically
parent
fca5106a33
commit
30dd360a57
|
@ -369,6 +369,8 @@ C4ConsoleQtViewportDockWidget::C4ConsoleQtViewportDockWidget(C4ConsoleQtMainWind
|
|||
setTitleBarWidget((title_label = new C4ConsoleQtViewportLabel(windowTitle(), this)));
|
||||
setWidget(view);
|
||||
connect(this, SIGNAL(topLevelChanged(bool)), this, SLOT(TopLevelChanged(bool)));
|
||||
// Register viewport widget for periodic rendering updates.
|
||||
cvp->viewport_widget = view;
|
||||
}
|
||||
|
||||
void C4ConsoleQtViewportDockWidget::mousePressEvent(QMouseEvent *eventPress)
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_QT_EDITOR
|
||||
#undef LineFeed
|
||||
#include <QWidget>
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIN32_WINDOWS
|
||||
|
||||
void UpdateWindowLayout(HWND hwnd)
|
||||
|
@ -170,7 +175,10 @@ bool C4Viewport::TogglePlayerLock() {return 0;}
|
|||
|
||||
void C4ViewportWindow::PerformUpdate()
|
||||
{
|
||||
#ifndef WITH_QT_EDITOR // done by callback
|
||||
#ifdef WITH_QT_EDITOR
|
||||
if (viewport_widget)
|
||||
viewport_widget->update();
|
||||
#else
|
||||
if (cvp)
|
||||
{
|
||||
cvp->UpdateOutputSize();
|
||||
|
|
|
@ -46,6 +46,10 @@ public:
|
|||
C4Window * Init(int32_t iPlayer);
|
||||
virtual void Close();
|
||||
virtual void PerformUpdate();
|
||||
|
||||
#ifdef WITH_QT_EDITOR
|
||||
class QWidget *viewport_widget;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue