diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 2aeec34798..4a54d9873b 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1707,10 +1707,8 @@ std::pair OPENGL_GAL::computeBitmapTextSize( const UTF8& aText unsigned int c = *chIt; const FONT_GLYPH_TYPE* glyph = LookupGlyph( c ); - wxASSERT( c == ' ' || glyph ); // space is not in the atlas - // a few chars - if( !glyph || // Not coded in font + if( !glyph || // Not coded in font c == '-' || c == '_' ) // Strange size of these 2 chars { glyph = defaultGlyph; diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp index aa41a8d713..2a77521305 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp @@ -63,7 +63,8 @@ DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aP m_OrientValidator( 1, &m_OrientValue ), m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits, false, 0 ), m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ), - m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ) + m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ), + m_inSelect( false ) { m_config = Kiface().KifaceSettings(); @@ -152,6 +153,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aP m_bpAdd->SetBitmap( KiBitmap( small_plus_xpm ) ); m_bpDelete->SetBitmap( KiBitmap( trash_xpm ) ); m_buttonAdd->SetBitmap( KiBitmap( small_plus_xpm ) ); + m_buttonBrowse->SetBitmap( KiBitmap( folder_xpm ) ); m_buttonRemove->SetBitmap( KiBitmap( trash_xpm ) ); FinishDialogSettings(); @@ -378,19 +380,27 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow() void DIALOG_FOOTPRINT_BOARD_EDITOR::select3DModel( int aModelIdx ) { + m_inSelect = true; + aModelIdx = std::max( 0, aModelIdx ); aModelIdx = std::min( aModelIdx, m_modelsGrid->GetNumberRows() - 1 ); if( m_modelsGrid->GetNumberRows() ) + { m_modelsGrid->SelectRow( aModelIdx ); + m_modelsGrid->SetGridCursor( aModelIdx, 0 ); + } m_PreviewPane->SetSelectedModel( aModelIdx ); + + m_inSelect = false; } void DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelSelected( wxGridEvent& aEvent ) { - select3DModel( aEvent.GetRow() ); + if( !m_inSelect ) + select3DModel( aEvent.GetRow() ); } @@ -439,7 +449,7 @@ void DIALOG_FOOTPRINT_BOARD_EDITOR::OnRemove3DModel( wxCommandEvent& ) if( idx >= 0 ) { m_shapes3D_list.erase( m_shapes3D_list.begin() + idx ); - m_modelsGrid->DeleteRows( idx ); + m_modelsGrid->DeleteRows( idx, 1 ); select3DModel( idx ); // will clamp idx within bounds m_PreviewPane->UpdateDummyModule(); @@ -507,6 +517,26 @@ void DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel( wxCommandEvent& ) } +void DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DRow( wxCommandEvent& ) +{ + MODULE_3D_SETTINGS model; + + model.m_Preview = true; + m_shapes3D_list.push_back( model ); + + int row = m_modelsGrid->GetNumberRows(); + m_modelsGrid->AppendRows( 1 ); + m_modelsGrid->SetCellValue( row, 1, wxT( "1" ) ); + + m_modelsGrid->SetFocus(); + m_modelsGrid->MakeCellVisible( row, 0 ); + m_modelsGrid->SetGridCursor( row, 0 ); + + m_modelsGrid->EnableCellEditControl( true ); + m_modelsGrid->ShowCellEditControl(); +} + + bool DIALOG_FOOTPRINT_BOARD_EDITOR::Validate() { // Commit any pending in-place edits and close the editor diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.h b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.h index 7a5f221dba..4550feb302 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.h +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.h @@ -62,6 +62,8 @@ private: int m_delayedFocusRow; int m_delayedFocusColumn; + bool m_inSelect; + public: // The dialog can be closed for several reasons. enum FP_PRM_EDITOR_RETVALUE @@ -88,6 +90,7 @@ private: void On3DModelCellChanged( wxGridEvent& aEvent ) override; void OnRemove3DModel( wxCommandEvent& ) override; void OnAdd3DModel( wxCommandEvent& ) override; + void OnAdd3DRow( wxCommandEvent& ) override; void GotoModuleEditor( wxCommandEvent& ) override; void UpdateModule( wxCommandEvent& ) override; void ExchangeModule( wxCommandEvent& ) override; diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp index 06aa73a224..e0f5b73a3c 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.cpp @@ -431,8 +431,14 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow m_buttonAdd = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW ); bSizer3DButtons->Add( m_buttonAdd, 0, wxTOP, 5 ); + m_buttonBrowse = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW ); + bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL, 5 ); + + + bSizer3DButtons->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_buttonRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW ); - bSizer3DButtons->Add( m_buttonRemove, 0, wxTOP, 5 ); + bSizer3DButtons->Add( m_buttonRemove, 0, wxTOP|wxLEFT, 5 ); bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -528,7 +534,8 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelSelected ), NULL, this ); - m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this ); + m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DRow ), NULL, this ); + m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this ); m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnRemove3DModel ), NULL, this ); m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this ); } @@ -552,7 +559,8 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::~DIALOG_FOOTPRINT_BOARD_EDITOR_BASE() m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelSelected ), NULL, this ); - m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this ); + m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DRow ), NULL, this ); + m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this ); m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnRemove3DModel ), NULL, this ); m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp index 9906576ca3..b2cc48dbe7 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.fbp @@ -4757,6 +4757,99 @@ + OnAdd3DRow + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + wxID_ANY + Browse + + 0 + + + 0 + + 1 + m_buttonBrowse + 1 + + + protected + 1 + + Resizable + + 1 + 29,29 + wxBU_AUTODRAW + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + OnAdd3DModel @@ -4783,9 +4876,19 @@ + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 0 + protected + 0 + + 5 - wxTOP + wxTOP|wxLEFT 0 1 diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h index 4d9e018089..20a9740695 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor_base.h @@ -106,6 +106,7 @@ class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE : public DIALOG_SHIM wxBoxSizer* bSizerMain3D; wxGrid* m_modelsGrid; wxBitmapButton* m_buttonAdd; + wxBitmapButton* m_buttonBrowse; wxBitmapButton* m_buttonRemove; wxButton* m_button8; wxBoxSizer* bLowerSizer3D; @@ -130,6 +131,7 @@ class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE : public DIALOG_SHIM virtual void GotoModuleEditor( wxCommandEvent& event ) { event.Skip(); } virtual void On3DModelCellChanged( wxGridEvent& event ) { event.Skip(); } virtual void On3DModelSelected( wxGridEvent& event ) { event.Skip(); } + virtual void OnAdd3DRow( wxCommandEvent& event ) { event.Skip(); } virtual void OnAdd3DModel( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemove3DModel( wxCommandEvent& event ) { event.Skip(); } virtual void Cfg3DPath( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp index 812fa52143..de0485a5f7 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp @@ -61,7 +61,8 @@ DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aP DIALOG_FOOTPRINT_FP_EDITOR_BASE( aParent ), m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits, false, 0 ), m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ), - m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ) + m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ), + m_inSelect( false ) { m_config = Kiface().KifaceSettings(); @@ -302,19 +303,27 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow() void DIALOG_FOOTPRINT_FP_EDITOR::select3DModel( int aModelIdx ) { + m_inSelect = true; + aModelIdx = std::max( 0, aModelIdx ); aModelIdx = std::min( aModelIdx, m_modelsGrid->GetNumberRows() - 1 ); if( m_modelsGrid->GetNumberRows() ) + { m_modelsGrid->SelectRow( aModelIdx ); + m_modelsGrid->SetGridCursor( aModelIdx, 0 ); + } m_PreviewPane->SetSelectedModel( aModelIdx ); + + m_inSelect = false; } void DIALOG_FOOTPRINT_FP_EDITOR::On3DModelSelected( wxGridEvent& aEvent ) { - select3DModel( aEvent.GetRow() ); + if( !m_inSelect ) + select3DModel( aEvent.GetRow() ); } @@ -431,6 +440,26 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel( wxCommandEvent& ) } +void DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DRow( wxCommandEvent& ) +{ + MODULE_3D_SETTINGS model; + + model.m_Preview = true; + m_shapes3D_list.push_back( model ); + + int row = m_modelsGrid->GetNumberRows(); + m_modelsGrid->AppendRows( 1 ); + m_modelsGrid->SetCellValue( row, 1, wxT( "1" ) ); + + m_modelsGrid->SetFocus(); + m_modelsGrid->MakeCellVisible( row, 0 ); + m_modelsGrid->SetGridCursor( row, 0 ); + + m_modelsGrid->EnableCellEditControl( true ); + m_modelsGrid->ShowCellEditControl(); +} + + bool DIALOG_FOOTPRINT_FP_EDITOR::Validate() { // Commit any pending in-place edits and close the editor diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.h b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.h index 895297450f..781813399b 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.h +++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.h @@ -57,6 +57,8 @@ private: int m_delayedFocusRow; int m_delayedFocusColumn; + bool m_inSelect; + public: // Constructor and destructor @@ -74,6 +76,7 @@ private: void On3DModelCellChanged( wxGridEvent& aEvent ) override; void OnRemove3DModel( wxCommandEvent& event ) override; void OnAdd3DModel( wxCommandEvent& event ) override; + void OnAdd3DRow( wxCommandEvent& event ) override; void Cfg3DPath( wxCommandEvent& event ) override; void OnGridSize( wxSizeEvent& event ) override; void OnAddField( wxCommandEvent& event ) override; diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp index 43d76043e2..62e4cd9aa3 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp @@ -358,6 +358,12 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare m_buttonAdd = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW ); bSizer3DButtons->Add( m_buttonAdd, 0, wxTOP, 5 ); + m_buttonBrowse = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW ); + bSizer3DButtons->Add( m_buttonBrowse, 0, wxALL, 5 ); + + + bSizer3DButtons->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_buttonRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW ); bSizer3DButtons->Add( m_buttonRemove, 0, wxTOP, 5 ); @@ -414,7 +420,8 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnDeleteField ), NULL, this ); m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelSelected ), NULL, this ); - m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); + m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DRow ), NULL, this ); + m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this ); m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this ); } @@ -429,7 +436,8 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::~DIALOG_FOOTPRINT_FP_EDITOR_BASE() m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnDeleteField ), NULL, this ); m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelSelected ), NULL, this ); - m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); + m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DRow ), NULL, this ); + m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this ); m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp index d8830d9c5a..0bab9a4316 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp @@ -3922,6 +3922,99 @@ + OnAdd3DRow + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + wxID_ANY + Browse + + 0 + + + 0 + + 1 + m_buttonBrowse + 1 + + + protected + 1 + + Resizable + + 1 + 29,29 + wxBU_AUTODRAW + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + OnAdd3DModel @@ -3948,6 +4041,16 @@ + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 0 + protected + 0 + + 5 wxTOP diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h index 11224dd9bc..441a34972c 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h +++ b/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h @@ -89,6 +89,7 @@ class DIALOG_FOOTPRINT_FP_EDITOR_BASE : public DIALOG_SHIM wxBoxSizer* bSizerMain3D; wxGrid* m_modelsGrid; wxBitmapButton* m_buttonAdd; + wxBitmapButton* m_buttonBrowse; wxBitmapButton* m_buttonRemove; wxButton* m_button8; wxBoxSizer* bLowerSizer3D; @@ -104,6 +105,7 @@ class DIALOG_FOOTPRINT_FP_EDITOR_BASE : public DIALOG_SHIM virtual void OnDeleteField( wxCommandEvent& event ) { event.Skip(); } virtual void On3DModelCellChanged( wxGridEvent& event ) { event.Skip(); } virtual void On3DModelSelected( wxGridEvent& event ) { event.Skip(); } + virtual void OnAdd3DRow( wxCommandEvent& event ) { event.Skip(); } virtual void OnAdd3DModel( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemove3DModel( wxCommandEvent& event ) { event.Skip(); } virtual void Cfg3DPath( wxCommandEvent& event ) { event.Skip(); }