Use QWidget::update() rather than repaint() in wxClientDC

Qt documentation advises to avoid calling repaint() except when an
immediate update is required, i.e. it corresponds to wxWindow::Update().
Use update() instead to avoid many Qt warnings that appeared when
resizing the caret sample window, for example.

Closes https://github.com/wxWidgets/wxWidgets/pull/1178
This commit is contained in:
chris2oph
2019-01-25 11:26:34 +00:00
committed by Vadim Zeitlin
parent b38587c0ca
commit b1594725c9

View File

@@ -106,7 +106,7 @@ wxClientDCImpl::~wxClientDCImpl()
if ( !pict->isNull() && !widget->paintingActive() && !rect.isEmpty() )
{
// only force the update of the rect affected by the DC
widget->repaint( rect );
widget->update( rect );
}
else
{