mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
On macOS, force a repaint of CustomPaintWidget upon UpdateRequest
* For some reason the actual paint event never makes it through after converting to metal-compatible widgets, but painting in response to UpdateRequest (which should become a paint really) works about as well.
This commit is contained in:
@@ -115,3 +115,12 @@ void CustomPaintWidget::paintEvent(QPaintEvent *e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(RENDERDOC_PLATFORM_APPLE)
|
||||
bool CustomPaintWidget::event(QEvent *e)
|
||||
{
|
||||
if(m_Ctx && e->type() == QEvent::UpdateRequest)
|
||||
paintEvent(NULL);
|
||||
return QWidget::event(e);
|
||||
}
|
||||
#endif
|
||||
@@ -72,6 +72,10 @@ private:
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
#if defined(RENDERDOC_PLATFORM_APPLE)
|
||||
bool event(QEvent *event) override;
|
||||
#endif
|
||||
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
QPaintEngine *paintEngine() const override { return m_Ctx ? NULL : QWidget::paintEngine(); }
|
||||
ICaptureContext *m_Ctx;
|
||||
|
||||
Reference in New Issue
Block a user