From 3c66f932bfe49e2d3653d62aa5e5c8376df5a8fa Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 17 Aug 2020 21:48:11 -0400 Subject: [PATCH] Synchronize flip board checkbox Fixes https://gitlab.com/kicad/code/kicad/-/issues/5224 --- pcbnew/tools/pcb_editor_control.cpp | 1 + pcbnew/widgets/appearance_controls.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index f149159b5b..21d36aa5ca 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -1573,6 +1573,7 @@ int PCB_EDITOR_CONTROL::FlipPcbView( const TOOL_EVENT& aEvent ) view()->SetMirror( !view()->IsMirroredX(), false ); view()->RecacheAllItems(); frame()->Refresh(); + frame()->OnDisplayOptionsChanged(); return 0; } diff --git a/pcbnew/widgets/appearance_controls.cpp b/pcbnew/widgets/appearance_controls.cpp index 32593b7d38..55d64ada70 100644 --- a/pcbnew/widgets/appearance_controls.cpp +++ b/pcbnew/widgets/appearance_controls.cpp @@ -428,6 +428,8 @@ void APPEARANCE_CONTROLS::UpdateDisplayOptions() wxASSERT( m_objectSettingsMap.count( LAYER_RATSNEST ) ); APPEARANCE_SETTING* ratsnest = m_objectSettingsMap.at( LAYER_RATSNEST ); ratsnest->ctl_visibility->SetValue( options.m_ShowGlobalRatsnest ); + + m_cbFlipBoard->SetValue( m_frame->GetCanvas()->GetView()->IsMirroredX() ); }