forked from KiCad/kicad-source-mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footprint_editor_control.cpp
624 lines (487 loc) · 19.4 KB
/
footprint_editor_control.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014-2019 CERN
* Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
* @author Maciej Suminski <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "footprint_editor_control.h"
#include "kicad_clipboard.h"
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <view/view_controls.h>
#include <footprint_edit_frame.h>
#include <pcbnew_id.h>
#include <confirm.h>
#include <widgets/infobar.h>
#include <bitmaps.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_group.h>
#include <zone.h>
#include <project.h>
#include <fp_lib_table.h>
#include <dialogs/dialog_cleanup_graphics.h>
#include <dialogs/dialog_footprint_checker.h>
#include <footprint_wizard_frame.h>
#include <kiway.h>
#include <drc/drc_results_provider.h>
FOOTPRINT_EDITOR_CONTROL::FOOTPRINT_EDITOR_CONTROL() :
PCB_TOOL_BASE( "pcbnew.ModuleEditor" ),
m_frame( nullptr ),
m_checkerDialog( nullptr )
{
}
FOOTPRINT_EDITOR_CONTROL::~FOOTPRINT_EDITOR_CONTROL()
{
}
void FOOTPRINT_EDITOR_CONTROL::Reset( RESET_REASON aReason )
{
m_frame = getEditFrame<FOOTPRINT_EDIT_FRAME>();
if( m_checkerDialog )
DestroyCheckerDialog();
}
bool FOOTPRINT_EDITOR_CONTROL::Init()
{
// Build a context menu for the footprint tree
//
CONDITIONAL_MENU& ctxMenu = m_menu.GetMenu();
auto libSelectedCondition =
[ this ]( const SELECTION& aSel )
{
LIB_ID sel = m_frame->GetTreeFPID();
return !sel.GetLibNickname().empty() && sel.GetLibItemName().empty();
};
// The libInferredCondition allows you to do things like New Symbol and Paste with a
// symbol selected (in other words, when we know the library context even if the library
// itself isn't selected.
auto libInferredCondition =
[ this ]( const SELECTION& aSel )
{
LIB_ID sel = m_frame->GetTreeFPID();
return !sel.GetLibNickname().empty();
};
auto pinnedLibSelectedCondition =
[ this ]( const SELECTION& aSel )
{
LIB_TREE_NODE* current = m_frame->GetCurrentTreeNode();
return current && current->m_Type == LIB_TREE_NODE::LIB && current->m_Pinned;
};
auto unpinnedLibSelectedCondition =
[ this ](const SELECTION& aSel )
{
LIB_TREE_NODE* current = m_frame->GetCurrentTreeNode();
return current && current->m_Type == LIB_TREE_NODE::LIB && !current->m_Pinned;
};
auto fpSelectedCondition =
[ this ]( const SELECTION& aSel )
{
LIB_ID sel = m_frame->GetTreeFPID();
return !sel.GetLibNickname().empty() && !sel.GetLibItemName().empty();
};
ctxMenu.AddItem( ACTIONS::pinLibrary, unpinnedLibSelectedCondition );
ctxMenu.AddItem( ACTIONS::unpinLibrary, pinnedLibSelectedCondition );
ctxMenu.AddSeparator();
ctxMenu.AddItem( PCB_ACTIONS::newFootprint, libSelectedCondition );
ctxMenu.AddItem( PCB_ACTIONS::createFootprint, libSelectedCondition );
ctxMenu.AddSeparator();
ctxMenu.AddItem( ACTIONS::save, libSelectedCondition || libInferredCondition );
ctxMenu.AddItem( ACTIONS::saveAs, libSelectedCondition );
ctxMenu.AddItem( ACTIONS::saveCopyAs, fpSelectedCondition );
ctxMenu.AddItem( ACTIONS::revert, libSelectedCondition || libInferredCondition );
ctxMenu.AddSeparator();
ctxMenu.AddItem( PCB_ACTIONS::cutFootprint, fpSelectedCondition );
ctxMenu.AddItem( PCB_ACTIONS::copyFootprint, fpSelectedCondition );
ctxMenu.AddItem( PCB_ACTIONS::pasteFootprint, libInferredCondition );
ctxMenu.AddItem( PCB_ACTIONS::deleteFootprint, fpSelectedCondition );
ctxMenu.AddSeparator();
ctxMenu.AddItem( PCB_ACTIONS::importFootprint, libInferredCondition );
ctxMenu.AddItem( PCB_ACTIONS::exportFootprint, fpSelectedCondition );
// If we've got nothing else to show, at least show a hide tree option
ctxMenu.AddItem( PCB_ACTIONS::hideFootprintTree, !libInferredCondition );
return true;
}
int FOOTPRINT_EDITOR_CONTROL::NewFootprint( const TOOL_EVENT& aEvent )
{
LIB_ID selected = m_frame->GetTreeFPID();
FOOTPRINT* newFootprint = m_frame->CreateNewFootprint( wxEmptyString );
if( !newFootprint )
return 0;
if( !m_frame->Clear_Pcb( true ) )
return 0;
canvas()->GetViewControls()->SetCrossHairCursorPosition( VECTOR2D( 0, 0 ), false );
m_frame->AddFootprintToBoard( newFootprint );
// Initialize data relative to nets and netclasses (for a new footprint the defaults are
// used). This is mandatory to handle and draw pads.
board()->BuildListOfNets();
newFootprint->SetPosition( wxPoint( 0, 0 ) );
newFootprint->ClearFlags();
m_frame->Zoom_Automatique( false );
m_frame->GetScreen()->SetContentModified();
// If selected from the library tree then go ahead and save it there
if( !selected.GetLibNickname().empty() )
{
LIB_ID fpid = newFootprint->GetFPID();
fpid.SetLibNickname( selected.GetLibNickname() );
newFootprint->SetFPID( fpid );
m_frame->SaveFootprint( newFootprint );
m_frame->ClearModify();
}
m_frame->UpdateView();
m_frame->Update3DView( true, true );
m_frame->SyncLibraryTree( false );
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::CreateFootprint( const TOOL_EVENT& aEvent )
{
LIB_ID selected = m_frame->GetTreeFPID();
if( m_frame->IsContentModified() )
{
if( !HandleUnsavedChanges( m_frame, _( "The current footprint has been modified. "
"Save changes?" ),
[&]() -> bool
{
return m_frame->SaveFootprint( footprint() );
} ) )
{
return 0;
}
}
auto* wizard = (FOOTPRINT_WIZARD_FRAME*) m_frame->Kiway().Player( FRAME_FOOTPRINT_WIZARD,
true, m_frame );
if( wizard->ShowModal( nullptr, m_frame ) )
{
// Creates the new footprint from python script wizard
FOOTPRINT* newFootprint = wizard->GetBuiltFootprint();
if( newFootprint ) // i.e. if create footprint command is OK
{
m_frame->Clear_Pcb( false );
canvas()->GetViewControls()->SetCrossHairCursorPosition( VECTOR2D( 0, 0 ), false );
// Add the new object to board
m_frame->AddFootprintToBoard( newFootprint );
// Initialize data relative to nets and netclasses (for a new footprint the defaults
// are used). This is mandatory to handle and draw pads.
board()->BuildListOfNets();
newFootprint->SetPosition( wxPoint( 0, 0 ) );
newFootprint->ClearFlags();
m_frame->Zoom_Automatique( false );
m_frame->GetScreen()->SetContentModified();
// If selected from the library tree then go ahead and save it there
if( !selected.GetLibNickname().empty() )
{
LIB_ID fpid = newFootprint->GetFPID();
fpid.SetLibNickname( selected.GetLibNickname() );
newFootprint->SetFPID( fpid );
m_frame->SaveFootprint( newFootprint );
m_frame->ClearModify();
}
m_frame->UpdateView();
canvas()->Refresh();
m_frame->Update3DView( true, true );
m_frame->SyncLibraryTree( false );
}
}
wizard->Destroy();
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::Save( const TOOL_EVENT& aEvent )
{
if( !footprint() ) // no loaded footprint
return 0;
if( m_frame->GetTargetFPID() == m_frame->GetLoadedFPID() )
{
if( m_frame->SaveFootprint( footprint() ) )
{
view()->Update( footprint() );
canvas()->ForceRefresh();
m_frame->ClearModify();
m_frame->UpdateTitle();
}
}
m_frame->RefreshLibraryTree();
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::SaveAs( const TOOL_EVENT& aEvent )
{
if( m_frame->GetTargetFPID().GetLibItemName().empty() )
{
// Save Library As
const wxString& src_libNickname = m_frame->GetTargetFPID().GetLibNickname();
wxString src_libFullName = m_frame->Prj().PcbFootprintLibs()->GetFullURI( src_libNickname );
if( m_frame->SaveLibraryAs( src_libFullName ) )
m_frame->SyncLibraryTree( true );
}
else if( m_frame->GetTargetFPID() == m_frame->GetLoadedFPID() )
{
// Save Board Footprint As
if( footprint() && m_frame->SaveFootprintAs( footprint() ) )
{
view()->Update( footprint() );
m_frame->ClearModify();
// Get rid of the save-will-update-board-only (or any other dismissable warning)
WX_INFOBAR* infobar = m_frame->GetInfoBar();
if( infobar->IsShown() && infobar->HasCloseButton() )
infobar->Dismiss();
canvas()->ForceRefresh();
m_frame->SyncLibraryTree( true );
}
}
else
{
// Save Selected Footprint As
FOOTPRINT* footprint = m_frame->LoadFootprint( m_frame->GetTargetFPID() );
if( footprint && m_frame->SaveFootprintAs( footprint ) )
m_frame->SyncLibraryTree( true );
}
m_frame->RefreshLibraryTree();
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::Revert( const TOOL_EVENT& aEvent )
{
getEditFrame<FOOTPRINT_EDIT_FRAME>()->RevertFootprint();
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::CutCopyFootprint( const TOOL_EVENT& aEvent )
{
LIB_ID fpID = m_frame->GetTreeFPID();
if( fpID == m_frame->GetLoadedFPID() )
m_copiedFootprint.reset( new FOOTPRINT( *m_frame->GetBoard()->GetFirstFootprint() ) );
else
m_copiedFootprint.reset( m_frame->LoadFootprint( fpID ) );
if( aEvent.IsAction( &PCB_ACTIONS::cutFootprint ) )
DeleteFootprint( aEvent );
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::PasteFootprint( const TOOL_EVENT& aEvent )
{
if( m_copiedFootprint && !m_frame->GetTreeFPID().GetLibNickname().empty() )
{
wxString newLib = m_frame->GetTreeFPID().GetLibNickname();
wxString newName = m_copiedFootprint->GetFPID().GetLibItemName();
while( m_frame->Prj().PcbFootprintLibs()->FootprintExists( newLib, newName ) )
newName += _( "_copy" );
m_copiedFootprint->SetFPID( LIB_ID( newLib, newName ) );
m_frame->SaveFootprintInLibrary( m_copiedFootprint.get(), newLib );
m_frame->SyncLibraryTree( true );
m_frame->FocusOnLibID( m_copiedFootprint->GetFPID() );
}
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::DeleteFootprint( const TOOL_EVENT& aEvent )
{
FOOTPRINT_EDIT_FRAME* frame = getEditFrame<FOOTPRINT_EDIT_FRAME>();
if( frame->DeleteFootprintFromLibrary( frame->GetTargetFPID(), true ) )
{
if( frame->GetTargetFPID() == frame->GetLoadedFPID() )
frame->Clear_Pcb( false );
frame->SyncLibraryTree( true );
}
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::ImportFootprint( const TOOL_EVENT& aEvent )
{
bool is_last_fp_from_brd = m_frame->IsCurrentFPFromBoard();
if( !m_frame->Clear_Pcb( true ) )
return -1; // this command is aborted
getViewControls()->SetCrossHairCursorPosition( VECTOR2D( 0, 0 ), false );
m_frame->ImportFootprint();
if( m_frame->GetBoard()->GetFirstFootprint() )
m_frame->GetBoard()->GetFirstFootprint()->ClearFlags();
frame()->ClearUndoRedoList();
// Update the save items if needed.
if( is_last_fp_from_brd )
{
m_frame->ReCreateMenuBar();
m_frame->ReCreateHToolbar();
}
m_toolMgr->RunAction( ACTIONS::zoomFitScreen, true );
m_frame->OnModify();
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::ExportFootprint( const TOOL_EVENT& aEvent )
{
LIB_ID fpID = m_frame->GetTreeFPID();
FOOTPRINT* fp;
if( !fpID.IsValid() )
fp = m_frame->GetBoard()->GetFirstFootprint();
else
fp = m_frame->LoadFootprint( fpID );
m_frame->ExportFootprint( fp );
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::EditFootprint( const TOOL_EVENT& aEvent )
{
m_frame->LoadFootprintFromLibrary( m_frame->GetTreeFPID() );
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::PinLibrary( const TOOL_EVENT& aEvent )
{
LIB_TREE_NODE* currentNode = m_frame->GetCurrentTreeNode();
if( currentNode && !currentNode->m_Pinned )
{
currentNode->m_Pinned = true;
m_frame->RegenerateLibraryTree();
}
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::UnpinLibrary( const TOOL_EVENT& aEvent )
{
LIB_TREE_NODE* currentNode = m_frame->GetCurrentTreeNode();
if( currentNode && currentNode->m_Pinned )
{
currentNode->m_Pinned = false;
m_frame->RegenerateLibraryTree();
}
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::ToggleFootprintTree( const TOOL_EVENT& aEvent )
{
m_frame->ToggleSearchTree();
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::Properties( const TOOL_EVENT& aEvent )
{
FOOTPRINT* footprint = m_frame->GetBoard()->GetFirstFootprint();
if( footprint )
{
getEditFrame<FOOTPRINT_EDIT_FRAME>()->OnEditItemRequest( footprint );
m_frame->GetCanvas()->Refresh();
}
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::DefaultPadProperties( const TOOL_EVENT& aEvent )
{
getEditFrame<FOOTPRINT_EDIT_FRAME>()->ShowPadPropertiesDialog( nullptr );
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::CleanupGraphics( const TOOL_EVENT& aEvent )
{
FOOTPRINT_EDIT_FRAME* editFrame = getEditFrame<FOOTPRINT_EDIT_FRAME>();
DIALOG_CLEANUP_GRAPHICS dlg( editFrame, true );
dlg.ShowModal();
return 0;
}
int FOOTPRINT_EDITOR_CONTROL::CheckFootprint( const TOOL_EVENT& aEvent )
{
if( !m_checkerDialog )
{
m_checkerDialog = new DIALOG_FOOTPRINT_CHECKER( m_frame );
m_checkerDialog->Show( true );
}
else // The dialog is just not visible (because the user has double clicked on an error item)
{
m_checkerDialog->SetMarkersProvider( new BOARD_DRC_ITEMS_PROVIDER( m_frame->GetBoard() ) );
m_checkerDialog->Show( true );
}
return 0;
}
void FOOTPRINT_EDITOR_CONTROL::DestroyCheckerDialog()
{
if( m_checkerDialog )
{
m_checkerDialog->Destroy();
m_checkerDialog = nullptr;
}
}
int FOOTPRINT_EDITOR_CONTROL::RepairFootprint( const TOOL_EVENT& aEvent )
{
FOOTPRINT* footprint = board()->Footprints().front();
int errors = 0;
wxString details;
// Repair duplicate IDs and missing nets.
std::set<KIID> ids;
int duplicates = 0;
auto processItem =
[&]( EDA_ITEM* aItem )
{
if( ids.count( aItem->m_Uuid ) )
{
duplicates++;
const_cast<KIID&>( aItem->m_Uuid ) = KIID();
}
ids.insert( aItem->m_Uuid );
};
// Footprint IDs are the most important, so give them the first crack at "claiming" a
// particular KIID.
processItem( footprint );
// After that the principal use is for DRC marker pointers, which are most likely to pads.
for( PAD* pad : footprint->Pads() )
processItem( pad );
// From here out I don't think order matters much.
processItem( &footprint->Reference() );
processItem( &footprint->Value() );
for( BOARD_ITEM* item : footprint->GraphicalItems() )
processItem( item );
for( ZONE* zone : footprint->Zones() )
processItem( zone );
for( PCB_GROUP* group : footprint->Groups() )
processItem( group );
if( duplicates )
{
errors += duplicates;
details += wxString::Format( _( "%d duplicate IDs replaced.\n" ), duplicates );
}
/*******************************
* Your test here
*/
/*******************************
* Inform the user
*/
if( errors )
{
m_frame->OnModify();
wxString msg = wxString::Format( _( "%d potential problems repaired." ), errors );
DisplayInfoMessage( m_frame, msg, details );
}
else
{
DisplayInfoMessage( m_frame, _( "No footprint problems found." ) );
}
return 0;
}
void FOOTPRINT_EDITOR_CONTROL::setTransitions()
{
Go( &FOOTPRINT_EDITOR_CONTROL::NewFootprint, PCB_ACTIONS::newFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::CreateFootprint, PCB_ACTIONS::createFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::Save, ACTIONS::save.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::SaveAs, ACTIONS::saveAs.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::SaveAs, ACTIONS::saveCopyAs.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::Revert, ACTIONS::revert.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::DeleteFootprint, PCB_ACTIONS::deleteFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::EditFootprint, PCB_ACTIONS::editFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::CutCopyFootprint, PCB_ACTIONS::cutFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::CutCopyFootprint, PCB_ACTIONS::copyFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::PasteFootprint, PCB_ACTIONS::pasteFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::ImportFootprint, PCB_ACTIONS::importFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::ExportFootprint, PCB_ACTIONS::exportFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::CleanupGraphics, PCB_ACTIONS::cleanupGraphics.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::CheckFootprint, PCB_ACTIONS::checkFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::RepairFootprint, PCB_ACTIONS::repairFootprint.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::PinLibrary, ACTIONS::pinLibrary.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::UnpinLibrary, ACTIONS::unpinLibrary.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::ToggleFootprintTree,
PCB_ACTIONS::showFootprintTree.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::ToggleFootprintTree,
PCB_ACTIONS::hideFootprintTree.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::Properties,
PCB_ACTIONS::footprintProperties.MakeEvent() );
Go( &FOOTPRINT_EDITOR_CONTROL::DefaultPadProperties,
PCB_ACTIONS::defaultPadProperties.MakeEvent() );
}