mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
Make global delete tracks remove tuning patterns
If we are removing the generated item, we should remove the generator as well Fixes https://gitlab.com/kicad/code/kicad/issues/21572
This commit is contained in:
parent
d356073798
commit
cb4c8e6647
@ -31,7 +31,9 @@ using namespace std::placeholders;
|
||||
#include <board_commit.h>
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
#include <pcb_generator.h>
|
||||
#include <pcb_track.h>
|
||||
#include <generators/pcb_tuning_pattern.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
#include <tools/global_edit_tool.h>
|
||||
@ -272,6 +274,15 @@ void DIALOG_GLOBAL_DELETION::DoGlobalDeletions()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( PCB_GENERATOR* generator : board->Generators() )
|
||||
{
|
||||
if( PCB_TUNING_PATTERN* pattern = dynamic_cast<PCB_TUNING_PATTERN*>( generator ) )
|
||||
{
|
||||
if( pattern->GetBoardItems().empty() )
|
||||
commit.Remove( pattern );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
commit.Push( _( "Global Delete" ) );
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include <eda_item.h>
|
||||
#include <geometry/geometry_utils.h>
|
||||
#include <pcb_base_edit_frame.h>
|
||||
#include <router/pns_meander.h>
|
||||
#include <router/pns_meander_placer_base.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user