From 806daecf85955cf95971d74deb3af9bd5dcfb416 Mon Sep 17 00:00:00 2001 From: wh201906 Date: Sat, 16 Mar 2024 21:18:05 +0800 Subject: [PATCH] Add toggleHV45Mode item to the measure tool's context menu The behavior of the measure tool is influenced by the horizontal/vertical/45-degree mode, but the context menu of the measure tool lacks an option to toggle this mode. In contrast, the drawing tools are also affected by this mode, and their context menu has the item to toggle this mode. --- pcbnew/tools/pcb_viewer_tools.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/pcb_viewer_tools.cpp b/pcbnew/tools/pcb_viewer_tools.cpp index 544ef48cc4..2e2ea4e243 100644 --- a/pcbnew/tools/pcb_viewer_tools.cpp +++ b/pcbnew/tools/pcb_viewer_tools.cpp @@ -51,6 +51,9 @@ bool PCB_VIEWER_TOOLS::Init() ctxMenu.AddItem( ACTIONS::cancelInteractive, activeToolCondition, 1 ); ctxMenu.AddSeparator( 1 ); + ctxMenu.AddCheckItem( PCB_ACTIONS::toggleHV45Mode, activeToolCondition, 2 ); + ctxMenu.AddSeparator( activeToolCondition, 2 ); + frame()->AddStandardSubMenus( m_menu ); return true;