From db46b6f9252755b26bc7a962c8a93eef18923c8c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 3 Nov 2023 12:32:26 +0000 Subject: [PATCH] Show selection before opening menu. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15922 --- gerbview/tools/gerbview_selection_tool.cpp | 3 +++ pagelayout_editor/tools/pl_selection_tool.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gerbview/tools/gerbview_selection_tool.cpp b/gerbview/tools/gerbview_selection_tool.cpp index c2ec56ef1d..0b3267ee2d 100644 --- a/gerbview/tools/gerbview_selection_tool.cpp +++ b/gerbview/tools/gerbview_selection_tool.cpp @@ -188,6 +188,9 @@ int GERBVIEW_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) m_selection.SetIsHover( true ); } + // Show selection before opening menu + m_frame->GetCanvas()->ForceRefresh(); + m_menu.ShowContextMenu( m_selection ); } else if( evt->IsDblClick( BUT_MIDDLE ) ) diff --git a/pagelayout_editor/tools/pl_selection_tool.cpp b/pagelayout_editor/tools/pl_selection_tool.cpp index 8a12ead3c6..5a5bfe2dde 100644 --- a/pagelayout_editor/tools/pl_selection_tool.cpp +++ b/pagelayout_editor/tools/pl_selection_tool.cpp @@ -127,6 +127,9 @@ int PL_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent ) m_selection.SetIsHover( true ); } + // Show selection before opening menu + m_frame->GetCanvas()->ForceRefresh(); + if( !selectionCancelled ) m_menu.ShowContextMenu( m_selection ); }