mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 18:23:15 +02:00
Implement UI condition for search panel visibility.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14826
This commit is contained in:
parent
2ffeca9f36
commit
95d104ab65
@ -475,6 +475,12 @@ void SCH_EDIT_FRAME::setupUIConditions()
|
|||||||
( !GetScreen()->Items().empty() || !SELECTION_CONDITIONS::Idle( aSel ) );
|
( !GetScreen()->Items().empty() || !SELECTION_CONDITIONS::Idle( aSel ) );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto searchPaneCond =
|
||||||
|
[this] ( const SELECTION& )
|
||||||
|
{
|
||||||
|
return m_auimgr.GetPane( SearchPaneName() ).IsShown();
|
||||||
|
};
|
||||||
|
|
||||||
auto hierarchyNavigatorCond =
|
auto hierarchyNavigatorCond =
|
||||||
[ this ] ( const SELECTION& aSel )
|
[ this ] ( const SELECTION& aSel )
|
||||||
{
|
{
|
||||||
@ -494,6 +500,7 @@ void SCH_EDIT_FRAME::setupUIConditions()
|
|||||||
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
|
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
|
||||||
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );
|
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );
|
||||||
|
|
||||||
|
mgr->SetConditions( EE_ACTIONS::showSearch, CHECK( searchPaneCond ) );
|
||||||
mgr->SetConditions( EE_ACTIONS::showHierarchy, CHECK( hierarchyNavigatorCond ) );
|
mgr->SetConditions( EE_ACTIONS::showHierarchy, CHECK( hierarchyNavigatorCond ) );
|
||||||
mgr->SetConditions( EE_ACTIONS::showNetNavigator, CHECK( netNavigatorCond ) );
|
mgr->SetConditions( EE_ACTIONS::showNetNavigator, CHECK( netNavigatorCond ) );
|
||||||
mgr->SetConditions( ACTIONS::toggleGrid, CHECK( cond.GridVisible() ) );
|
mgr->SetConditions( ACTIONS::toggleGrid, CHECK( cond.GridVisible() ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user