Gerbview: fix broken XOR mode
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10122
This commit is contained in:
parent
cbb70f0da1
commit
1f178e2b93
|
@ -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 );
|
||||
|
@ -1081,10 +1081,10 @@ void GERBVIEW_FRAME::setupUIConditions()
|
|||
};
|
||||
|
||||
auto xorModeCond =
|
||||
[this] ( const SELECTION& )
|
||||
{
|
||||
return gvconfig()->m_Display.m_XORMode;
|
||||
};
|
||||
[this] ( const SELECTION& )
|
||||
{
|
||||
return gvconfig()->m_Display.m_XORMode;
|
||||
};
|
||||
|
||||
auto highContrastModeCond =
|
||||
[this] ( const SELECTION& )
|
||||
|
|
|
@ -309,10 +309,9 @@ 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();
|
||||
}
|
||||
|
||||
m_frame->UpdateXORLayers();
|
||||
}
|
||||
else if( aEvent.IsAction( &GERBVIEW_ACTIONS::toggleXORMode ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue