Gerbview: fix broken XOR mode

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10122
This commit is contained in:
Mike Williams 2022-12-19 10:58:40 -05:00
parent cbb70f0da1
commit 1f178e2b93
2 changed files with 8 additions and 9 deletions

View File

@ -573,8 +573,8 @@ void GERBVIEW_FRAME::UpdateXORLayers()
{
view->SetLayerDiff( GERBER_DRAW_LAYER( i ), gvconfig()->m_Display.m_XORMode );
// Caching doesn't work with layered rendering of diff'd layers
if( gvconfig()->m_Display.m_DiffMode )
// Caching doesn't work with layered rendering of XOR'd layers
if( gvconfig()->m_Display.m_XORMode )
view->SetLayerTarget( GERBER_DRAW_LAYER( i ), KIGFX::TARGET_NONCACHED );
else
view->SetLayerTarget( GERBER_DRAW_LAYER( i ), target );

View File

@ -309,11 +309,10 @@ int GERBVIEW_CONTROL::DisplayControl( const TOOL_EVENT& aEvent )
cfg->m_Display.m_DiffMode = !cfg->m_Display.m_DiffMode;
if( cfg->m_Display.m_DiffMode && cfg->m_Display.m_XORMode )
{
cfg->m_Display.m_XORMode = false;
m_frame->UpdateXORLayers();
}
}
else if( aEvent.IsAction( &GERBVIEW_ACTIONS::toggleXORMode ) )
{
cfg->m_Display.m_XORMode = !cfg->m_Display.m_XORMode;