diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp index bd6d833b3d..15993a7504 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp @@ -96,7 +96,7 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( m_previewPane = new PANEL_PREVIEW_3D_MODEL( this, m_frame, m_footprint, &m_shapes3D_list ); - bLowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 ); + m_LowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 ); // Configure button logos m_button3DShapeAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) ); diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp index 097c29f2d9..eb50740e82 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -15,10 +15,7 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow* { bSizerMain3D = new wxBoxSizer( wxVERTICAL ); - wxStaticBoxSizer* sbSizer3; - sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL ); - - m_modelsGrid = new WX_GRID( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE ); + m_modelsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE ); // Grid m_modelsGrid->CreateGrid( 3, 3 ); @@ -48,50 +45,46 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow* // Cell Defaults m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - sbSizer3->Add( m_modelsGrid, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 ); + bSizerMain3D->Add( m_modelsGrid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bSizer3DButtons; bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL ); - m_button3DShapeAdd = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_button3DShapeAdd = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bSizer3DButtons->Add( m_button3DShapeAdd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - m_button3DShapeBrowse = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_button3DShapeBrowse = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bSizer3DButtons->Add( m_button3DShapeBrowse, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); bSizer3DButtons->Add( 20, 0, 0, 0, 5 ); - m_button3DShapeRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); + m_button3DShapeRemove = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 ); bSizer3DButtons->Add( m_button3DShapeRemove, 0, wxALIGN_CENTER_VERTICAL, 5 ); bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 ); - m_buttonConfig3DPaths = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonConfig3DPaths = new wxButton( this, wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3DButtons->Add( m_buttonConfig3DPaths, 0, wxALL, 5 ); - sbSizer3->Add( bSizer3DButtons, 0, wxEXPAND, 5 ); + bSizerMain3D->Add( bSizer3DButtons, 0, wxEXPAND, 5 ); + + m_LowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); - bSizerMain3D->Add( sbSizer3, 4, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); - - - bSizerMain3D->Add( bLowerSizer3D, 11, wxEXPAND, 5 ); + bSizerMain3D->Add( m_LowerSizer3D, 0, wxEXPAND, 5 ); this->SetSizer( bSizerMain3D ); this->Layout(); - bSizerMain3D->Fit( this ); // Connect Events + this->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnGridSize ) ); this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnUpdateUI ) ); m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelCellChanged ), NULL, this ); m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelSelected ), NULL, this ); - m_modelsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnGridSize ), NULL, this ); m_button3DShapeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DRow ), NULL, this ); m_button3DShapeBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DModel ), NULL, this ); m_button3DShapeRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnRemove3DModel ), NULL, this ); @@ -101,10 +94,10 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow* PANEL_FP_PROPERTIES_3D_MODEL_BASE::~PANEL_FP_PROPERTIES_3D_MODEL_BASE() { // Disconnect Events + this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnGridSize ) ); this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnUpdateUI ) ); m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelCellChanged ), NULL, this ); m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelSelected ), NULL, this ); - m_modelsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnGridSize ), NULL, this ); m_button3DShapeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DRow ), NULL, this ); m_button3DShapeBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DModel ), NULL, this ); m_button3DShapeRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnRemove3DModel ), NULL, this ); diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp b/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp index c3c1896d8c..a3c7fc156a 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model_base.fbp @@ -45,13 +45,14 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE - + 778,286 0 wxTAB_TRAVERSAL + OnGridSize OnUpdateUI @@ -60,21 +61,108 @@ protected 5 - wxEXPAND|wxRIGHT|wxLEFT - 4 - + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + + + wxALIGN_LEFT + + wxALIGN_TOP + 0 + 1 + wxALIGN_LEFT + 22 + "" "3D Model(s)" "Show" + wxALIGN_CENTER + 3 + 20,650,65 + + 1 + 0 + Dock + 0 + Left + 0 + 0 + 0 + 0 + 1 + 1 + + 1 + + + 0 + 0 + 0 wxID_ANY - + + + + 0 + 0 + + 0 + + + 0 - sbSizer3 - wxVERTICAL - 1 + 1 + m_modelsGrid + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTER + 0 + + wxALIGN_CENTER + + 3 + 1 + + WX_GRID; widgets/wx_grid.h; forward_declare + 0 + + + + wxBORDER_SIMPLE + On3DModelCellChanged + On3DModelSelected + + + + 5 + wxEXPAND + 0 + + + bSizer3DButtons + wxHORIZONTAL none 5 - wxEXPAND|wxLEFT|wxRIGHT - 1 - + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + 1 1 1 @@ -83,50 +171,34 @@ - 0 - 0 + 0 + 1 - - - wxALIGN_LEFT - - wxALIGN_TOP 0 1 - wxALIGN_LEFT - 22 - "" "3D Model(s)" "Show" - wxALIGN_CENTER - 3 - 20,650,65 1 + + 0 0 + Dock 0 Left - 0 - 0 - 0 - 0 - 1 1 1 + - - 0 0 0 wxID_ANY - - - - 0 - 0 + Add 3D Model + + 0 0 @@ -134,358 +206,272 @@ 0 1 - m_modelsGrid + m_button3DShapeAdd 1 protected 1 + + Resizable - wxALIGN_CENTER - 0 - - wxALIGN_CENTER - - 3 1 - - WX_GRID; widgets/wx_grid.h; forward_declare + -1,-1 + + ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + - wxBORDER_SIMPLE - On3DModelCellChanged - On3DModelSelected - OnGridSize + + OnAdd3DRow + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Browse + + 0 + + 0 + + + 0 + + 1 + m_button3DShapeBrowse + 1 + + + protected + 1 + + + + Resizable + 1 + -1,-1 + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnAdd3DModel + + + + 5 + + 0 + + 0 + protected + 20 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Remove 3D Model + + 0 + + 0 + + + 0 + + 1 + m_button3DShapeRemove + 1 + + + protected + 1 + + + + Resizable + 1 + -1,-1 + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRemove3DModel 5 wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALL 0 - + + 1 + 1 + 1 + 1 + + + + + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Configure Paths... + + 0 + + 0 + + + 0 - bSizer3DButtons - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Add 3D Model - - 0 - - 0 - - - 0 - - 1 - m_button3DShapeAdd - 1 - - - protected - 1 - - - - Resizable - 1 - -1,-1 - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnAdd3DRow - - - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Browse - - 0 - - 0 - - - 0 - - 1 - m_button3DShapeBrowse - 1 - - - protected - 1 - - - - Resizable - 1 - -1,-1 - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnAdd3DModel - - - - 5 - - 0 - - 0 - protected - 20 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Remove 3D Model - - 0 - - 0 - - - 0 - - 1 - m_button3DShapeRemove - 1 - - - protected - 1 - - - - Resizable - 1 - -1,-1 - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnRemove3DModel - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Configure Paths... - - 0 - - 0 - - - 0 - - 1 - m_buttonConfig3DPaths - 1 - - - protected - 1 - - - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Cfg3DPath - - + 1 + m_buttonConfig3DPaths + 1 + + + protected + 1 + + + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Cfg3DPath @@ -493,10 +479,10 @@ 5 wxEXPAND - 11 + 0 - bLowerSizer3D + m_LowerSizer3D wxHORIZONTAL protected diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model_base.h b/pcbnew/dialogs/panel_fp_properties_3d_model_base.h index 98d365ca5c..80be002d07 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model_base.h +++ b/pcbnew/dialogs/panel_fp_properties_3d_model_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -24,7 +24,6 @@ class WX_GRID; #include #include #include -#include #include /////////////////////////////////////////////////////////////////////////// @@ -44,13 +43,13 @@ class PANEL_FP_PROPERTIES_3D_MODEL_BASE : public wxPanel wxBitmapButton* m_button3DShapeBrowse; wxBitmapButton* m_button3DShapeRemove; wxButton* m_buttonConfig3DPaths; - wxBoxSizer* bLowerSizer3D; + wxBoxSizer* m_LowerSizer3D; // Virtual event handlers, override them in your derived class + virtual void OnGridSize( wxSizeEvent& event ) { event.Skip(); } virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void On3DModelCellChanged( wxGridEvent& event ) { event.Skip(); } virtual void On3DModelSelected( wxGridEvent& event ) { event.Skip(); } - virtual void OnGridSize( wxSizeEvent& event ) { event.Skip(); } virtual void OnAdd3DRow( wxCommandEvent& event ) { event.Skip(); } virtual void OnAdd3DModel( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemove3DModel( wxCommandEvent& event ) { event.Skip(); } @@ -59,7 +58,7 @@ class PANEL_FP_PROPERTIES_3D_MODEL_BASE : public wxPanel public: - PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 778,286 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); ~PANEL_FP_PROPERTIES_3D_MODEL_BASE();