OPENGL_GAL, draw bitmap: Rebuild the bitmap cache if the bitmap itself was rotated.
Fixes #12378 https://gitlab.com/kicad/code/kicad/issues/12378 Fix also a Coverity warning.
This commit is contained in:
parent
9523586bf1
commit
d4feb59ed9
|
@ -113,10 +113,16 @@ GLuint GL_BITMAP_CACHE::RequestBitmap( const BITMAP_BASE* aBitmap )
|
||||||
|
|
||||||
if( it != m_bitmaps.end() )
|
if( it != m_bitmaps.end() )
|
||||||
{
|
{
|
||||||
// A bitmap is found in cache bitmap.
|
// A bitmap is found in cache bitmap. Ensure the associated texture
|
||||||
// Ensure the associated texture is still valid (can be destroyed somewhere)
|
// is still valid.
|
||||||
if( glIsTexture( it->second.id ) )
|
// It can be destroyed somewhere or the corresponding bitmap can be
|
||||||
|
// modifed (rotated)
|
||||||
|
if( ( it->second.w == aBitmap->GetSizePixels().x ) &&
|
||||||
|
( it->second.h == aBitmap->GetSizePixels().y ) &&
|
||||||
|
glIsTexture( it->second.id ) )
|
||||||
|
{
|
||||||
return it->second.id;
|
return it->second.id;
|
||||||
|
}
|
||||||
|
|
||||||
// else if not valid, it will be recreated.
|
// else if not valid, it will be recreated.
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ PANEL_CABLE_SIZE::PANEL_CABLE_SIZE( wxWindow* parent, wxWindowID id, const wxPoi
|
||||||
m_updatingResistanceDc = false;
|
m_updatingResistanceDc = false;
|
||||||
m_updatingRVdrop = false;
|
m_updatingRVdrop = false;
|
||||||
m_updatingPower = false;
|
m_updatingPower = false;
|
||||||
|
m_updatingConductorMaterialResitivity = false;
|
||||||
|
|
||||||
m_imperial = false;
|
m_imperial = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue