Table support for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17333
This commit is contained in:
parent
85d0126187
commit
ccfefc3971
|
@ -735,6 +735,7 @@ void FOOTPRINT::Add( BOARD_ITEM* aBoardItem, ADD_MODE aMode, bool aSkipConnectiv
|
|||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_SHAPE_T:
|
||||
case PCB_TEXTBOX_T:
|
||||
case PCB_TABLE_T:
|
||||
case PCB_REFERENCE_IMAGE_T:
|
||||
if( aMode == ADD_MODE::APPEND )
|
||||
m_drawings.push_back( aBoardItem );
|
||||
|
@ -1689,6 +1690,8 @@ INSPECT_RESULT FOOTPRINT::Visit( INSPECTOR inspector, void* testData,
|
|||
case PCB_DIM_ORTHOGONAL_T:
|
||||
case PCB_SHAPE_T:
|
||||
case PCB_TEXTBOX_T:
|
||||
case PCB_TABLE_T:
|
||||
case PCB_TABLECELL_T:
|
||||
if( !drawingsScanned )
|
||||
{
|
||||
if( IterateForward<BOARD_ITEM*>( m_drawings, inspector, testData, aScanTypes )
|
||||
|
|
|
@ -174,6 +174,7 @@ void FOOTPRINT_EDIT_FRAME::doReCreateMenuBar()
|
|||
placeMenu->Add( PCB_ACTIONS::placeReferenceImage );
|
||||
placeMenu->Add( PCB_ACTIONS::placeText );
|
||||
placeMenu->Add( PCB_ACTIONS::drawTextBox );
|
||||
placeMenu->Add( PCB_ACTIONS::drawTable );
|
||||
|
||||
placeMenu->AppendSeparator();
|
||||
placeMenu->Add( PCB_ACTIONS::drawAlignedDimension );
|
||||
|
|
|
@ -1162,6 +1162,8 @@ int DRAWING_TOOL::DrawTable( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
else
|
||||
{
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear );
|
||||
|
||||
table->ClearFlags();
|
||||
table->Normalize();
|
||||
|
||||
|
@ -1170,8 +1172,6 @@ int DRAWING_TOOL::DrawTable( const TOOL_EVENT& aEvent )
|
|||
// QuasiModal required for Scintilla auto-complete
|
||||
if( dlg.ShowQuasiModal() == wxID_OK )
|
||||
{
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear );
|
||||
|
||||
commit.Add( table, m_frame->GetScreen() );
|
||||
commit.Push( _( "Draw Table" ) );
|
||||
|
||||
|
|
|
@ -412,7 +412,15 @@ int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
GENERAL_COLLECTORS_GUIDE guide = getCollectorsGuide();
|
||||
GENERAL_COLLECTOR collector;
|
||||
|
||||
collector.Collect( board(), { PCB_TABLECELL_T }, evt->DragOrigin(), guide );
|
||||
if( m_isFootprintEditor )
|
||||
{
|
||||
collector.Collect( board()->GetFirstFootprint(), { PCB_TABLECELL_T },
|
||||
evt->DragOrigin(), guide );
|
||||
}
|
||||
else
|
||||
{
|
||||
collector.Collect( board(), { PCB_TABLECELL_T }, evt->DragOrigin(), guide );
|
||||
}
|
||||
|
||||
if( collector.GetCount() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue