From 0dc0536cbf4568e6315945aada239cd082654325 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 26 Aug 2020 17:19:32 -0700 Subject: [PATCH] pcbnew: Fix Select All copy-pasta Adds condition to footprint editor and corrects condition for both modedit and pcbnew --- pcbnew/footprint_edit_frame.cpp | 1 + pcbnew/tools/pcb_editor_conditions.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index b8391b3983..9358887fb5 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -964,6 +964,7 @@ void FOOTPRINT_EDIT_FRAME::setupUIConditions() mgr->SetConditions( ACTIONS::pasteSpecial, ENABLE( SELECTION_CONDITIONS::Idle && cond.NoActiveTool() ) ); mgr->SetConditions( ACTIONS::doDelete, ENABLE( SELECTION_CONDITIONS::NotEmpty ) ); mgr->SetConditions( ACTIONS::duplicate, ENABLE( SELECTION_CONDITIONS::NotEmpty ) ); + mgr->SetConditions( ACTIONS::selectAll, ENABLE( cond.HasItems() ) ); mgr->SetConditions( PCB_ACTIONS::padDisplayMode, CHECK( !cond.PadFillDisplay() ) ); mgr->SetConditions( PCB_ACTIONS::textOutlines, CHECK( !cond.TextFillDisplay() ) ); diff --git a/pcbnew/tools/pcb_editor_conditions.cpp b/pcbnew/tools/pcb_editor_conditions.cpp index 1ce26e2bfa..5ac299b0ee 100644 --- a/pcbnew/tools/pcb_editor_conditions.cpp +++ b/pcbnew/tools/pcb_editor_conditions.cpp @@ -41,7 +41,7 @@ SELECTION_CONDITION PCB_EDITOR_CONDITIONS::HasItems() wxASSERT( drwFrame ); - return std::bind( &PCB_EDITOR_CONDITIONS::padNumberDisplayFunc, _1, drwFrame ); + return std::bind( &PCB_EDITOR_CONDITIONS::hasItemsFunc, _1, drwFrame ); }