7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-19 14:11:41 +00:00

View menus: fix show/hide panel inconsistencies in FP and Symbol editors

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19147
This commit is contained in:
jean-pierre charras 2024-11-18 14:48:30 +01:00
parent 732f03753d
commit e9651794d6
4 changed files with 18 additions and 10 deletions

View File

@ -801,7 +801,7 @@ TOOL_ACTION ACTIONS::unpinLibrary( TOOL_ACTION_ARGS()
TOOL_ACTION ACTIONS::showLibraryTree( TOOL_ACTION_ARGS()
.Name( "common.Control.showLibraryTree" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Library Tree" ) )
.FriendlyName( _( "Library Tree" ) )
.Icon( BITMAPS::search_tree ) );
TOOL_ACTION ACTIONS::hideLibraryTree( TOOL_ACTION_ARGS()

View File

@ -116,8 +116,14 @@ void SYMBOL_EDIT_FRAME::doReCreateMenuBar()
//
ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
ACTION_MENU* showHidePanels = new ACTION_MENU( false, selTool );
showHidePanels->SetTitle( _( "Panels" ) );
showHidePanels->Add( ACTIONS::showProperties, ACTION_MENU::CHECK );
showHidePanels->Add( ACTIONS::showLibraryTree, ACTION_MENU::CHECK );
viewMenu->Add( showHidePanels );
viewMenu->AppendSeparator();
viewMenu->Add( ACTIONS::showSymbolBrowser );
viewMenu->Add( ACTIONS::showProperties, ACTION_MENU::CHECK );
viewMenu->AppendSeparator();
viewMenu->Add( ACTIONS::zoomInCenter );
@ -127,7 +133,6 @@ void SYMBOL_EDIT_FRAME::doReCreateMenuBar()
viewMenu->Add( ACTIONS::zoomRedraw );
viewMenu->AppendSeparator();
viewMenu->Add( ACTIONS::showLibraryTree, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::showHiddenPins, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::showHiddenFields, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::togglePinAltIcons,ACTION_MENU::CHECK );

View File

@ -556,7 +556,7 @@ void SYMBOL_EDIT_FRAME::setupUIConditions()
mgr->SetConditions( EE_ACTIONS::showElectricalTypes, CHECK( pinTypeCond ) );
mgr->SetConditions( ACTIONS::toggleBoundingBoxes, CHECK( cond.BoundingBoxes() ) );
mgr->SetConditions( EE_ACTIONS::showDesignBlockPanel, CHECK( showLibraryTreeCond ) );
mgr->SetConditions( ACTIONS::showLibraryTree, CHECK( showLibraryTreeCond ) );
mgr->SetConditions( ACTIONS::showProperties, CHECK( propertiesCond ) );
mgr->SetConditions( EE_ACTIONS::showHiddenPins, CHECK( hiddenPinCond ) );
mgr->SetConditions( EE_ACTIONS::showHiddenFields, CHECK( hiddenFieldCond ) );

View File

@ -4,7 +4,7 @@
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -120,6 +120,14 @@ void FOOTPRINT_EDIT_FRAME::doReCreateMenuBar()
//
ACTION_MENU* viewMenu = new ACTION_MENU( false, selTool );
ACTION_MENU* showHidePanels = new ACTION_MENU( false, selTool );
showHidePanels->SetTitle( _( "Panels" ) );
showHidePanels->Add( ACTIONS::showProperties, ACTION_MENU::CHECK );
showHidePanels->Add( ACTIONS::showLibraryTree, ACTION_MENU::CHECK );
showHidePanels->Add( PCB_ACTIONS::showLayersManager, ACTION_MENU::CHECK );
viewMenu->Add( showHidePanels );
viewMenu->AppendSeparator();
viewMenu->Add( ACTIONS::showFootprintBrowser );
viewMenu->Add( ACTIONS::show3DViewer );
@ -153,11 +161,6 @@ void FOOTPRINT_EDIT_FRAME::doReCreateMenuBar()
viewMenu->Add( PCB_ACTIONS::flipBoard, ACTION_MENU::CHECK );
viewMenu->AppendSeparator();
viewMenu->Add( ACTIONS::showProperties, ACTION_MENU::CHECK );
viewMenu->Add( ACTIONS::showLibraryTree, ACTION_MENU::CHECK );
viewMenu->Add( PCB_ACTIONS::showLayersManager, ACTION_MENU::CHECK );
//-- Place menu -------------------------------------------------------
//