Better synchronization of various ratsnest visibility controls.
This commit is contained in:
parent
a872ed11bf
commit
52edbf91dc
|
@ -174,6 +174,8 @@ int PCB_CONTROL::ToggleRatsnest( const TOOL_EVENT& aEvent )
|
|||
Flip( displayOptions().m_DisplayRatsnestLinesCurved );
|
||||
}
|
||||
|
||||
frame()->OnDisplayOptionsChanged();
|
||||
|
||||
canvas()->RedrawRatsnest();
|
||||
canvas()->Refresh();
|
||||
|
||||
|
@ -354,6 +356,13 @@ int PCB_CONTROL::RatsnestModeCycle( const TOOL_EVENT& aEvent )
|
|||
displayOptions().m_ShowGlobalRatsnest = false;
|
||||
}
|
||||
|
||||
getEditFrame<PCB_EDIT_FRAME>()->SetElementVisibility( LAYER_RATSNEST,
|
||||
displayOptions().m_ShowGlobalRatsnest );
|
||||
|
||||
frame()->OnDisplayOptionsChanged();
|
||||
|
||||
canvas()->RedrawRatsnest();
|
||||
canvas()->Refresh();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2018,6 +2018,7 @@ void APPEARANCE_CONTROLS::onObjectVisibilityChanged( GAL_LAYER_ID aLayer, bool i
|
|||
{
|
||||
m_frame->GetPcbNewSettings()->m_Display.m_ShowGlobalRatsnest = isVisible;
|
||||
m_frame->GetBoard()->SetElementVisibility( aLayer, isVisible );
|
||||
m_frame->OnDisplayOptionsChanged();
|
||||
m_frame->GetCanvas()->RedrawRatsnest();
|
||||
}
|
||||
|
||||
|
@ -3077,7 +3078,13 @@ void APPEARANCE_CONTROLS::onRatsnestMode( wxCommandEvent& aEvent )
|
|||
cfg->m_Display.m_ShowGlobalRatsnest = false;
|
||||
}
|
||||
|
||||
m_frame->GetCanvas()->RedrawRatsnest();
|
||||
if( PCB_EDIT_FRAME* editframe = dynamic_cast<PCB_EDIT_FRAME*>( m_frame ) )
|
||||
{
|
||||
editframe->SetElementVisibility( LAYER_RATSNEST, cfg->m_Display.m_ShowGlobalRatsnest );
|
||||
editframe->OnDisplayOptionsChanged();
|
||||
editframe->GetCanvas()->RedrawRatsnest();
|
||||
editframe->GetCanvas()->Refresh();
|
||||
}
|
||||
passOnFocus();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue