3d-viewer: Force canvas refresh before screenshot

In some linux configurations, the canvas refresh must be posted before
being handled.  Simply requesting the refresh can queue the event,
preventing an up to date GL canvas from being saved.

Fixes: lp:1819536
* https://bugs.launchpad.net/kicad/+bug/1819536

(cherry picked from commit 707e7b4b65)
This commit is contained in:
Seth Hillbrand 2019-04-08 22:45:31 -07:00
parent 0b754562f6
commit 1294b4fec8
1 changed files with 2 additions and 2 deletions

View File

@ -960,7 +960,7 @@ void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
}
// Be sure we have the latest 3D view (remember 3D view is buffered)
Refresh();
m_canvas->Request_refresh( true );
wxYield();
// Build image from the 3D buffer
@ -1262,4 +1262,4 @@ void EDA_3D_VIEWER::loadCommonSettings()
cmnCfg.Read( ENBL_MOUSEWHEEL_PAN_KEY, &option, false );
m_settings.SetFlag( FL_MOUSEWHEEL_PANNING, option );
}
}
}