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:
@@ -106,7 +106,7 @@ wxClientDCImpl::~wxClientDCImpl()
|
|||||||
if ( !pict->isNull() && !widget->paintingActive() && !rect.isEmpty() )
|
if ( !pict->isNull() && !widget->paintingActive() && !rect.isEmpty() )
|
||||||
{
|
{
|
||||||
// only force the update of the rect affected by the DC
|
// only force the update of the rect affected by the DC
|
||||||
widget->repaint( rect );
|
widget->update( rect );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user