Clear selection before deleting objects during conversion.
Fixes https://gitlab.com/kicad/code/kicad/issues/12879
This commit is contained in:
parent
03ba14c6d3
commit
3fc727bb91
|
@ -352,7 +352,10 @@ int CONVERT_TOOL::CreatePolys( const TOOL_EVENT& aEvent )
|
|||
|
||||
if( convertSettings.m_DeleteOriginals )
|
||||
{
|
||||
for( EDA_ITEM* item : selection )
|
||||
PCB_SELECTION selectionCopy = selection;
|
||||
m_selectionTool->ClearSelection();
|
||||
|
||||
for( EDA_ITEM* item : selectionCopy )
|
||||
{
|
||||
if( item->GetFlags() & SKIP_STRUCT )
|
||||
commit.Remove( item );
|
||||
|
|
|
@ -45,17 +45,17 @@
|
|||
//
|
||||
TOOL_ACTION PCB_ACTIONS::convertToPoly( "pcbnew.Convert.convertToPoly",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Create Polygon from Selection" ), _( "Creates a graphic polygon from the selection" ),
|
||||
_( "Create Polygon from Selection..." ), _( "Creates a graphic polygon from the selection" ),
|
||||
BITMAPS::add_graphical_polygon );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::convertToZone( "pcbnew.Convert.convertToZone",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Create Zone from Selection" ), _( "Creates a copper zone from the selection" ),
|
||||
_( "Create Zone from Selection..." ), _( "Creates a copper zone from the selection" ),
|
||||
BITMAPS::add_zone );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::convertToKeepout( "pcbnew.Convert.convertToKeepout",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Create Rule Area from Selection" ), _( "Creates a rule area from the selection" ),
|
||||
_( "Create Rule Area from Selection..." ), _( "Creates a rule area from the selection" ),
|
||||
BITMAPS::add_keepout_area );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::convertToLines( "pcbnew.Convert.convertToLines",
|
||||
|
|
Loading…
Reference in New Issue