From 37c8462c8bb92eda4c2e13b985e6f21d6f5f59fe Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 15 Sep 2015 20:47:20 +0200 Subject: [PATCH] 3D viewe: Very minor fixes in 3D Display Options dialog. --- .../dialogs/dialog_3D_view_option_base.cpp | 42 +++++++++---------- .../dialogs/dialog_3D_view_option_base.fbp | 42 +++++++++---------- .../dialogs/dialog_3D_view_option_base.h | 14 +++---- kicad/mainframe.cpp | 24 ----------- 4 files changed, 49 insertions(+), 73 deletions(-) diff --git a/3d-viewer/dialogs/dialog_3D_view_option_base.cpp b/3d-viewer/dialogs/dialog_3D_view_option_base.cpp index 642865c1e0..74969b34b1 100644 --- a/3d-viewer/dialogs/dialog_3D_view_option_base.cpp +++ b/3d-viewer/dialogs/dialog_3D_view_option_base.cpp @@ -25,64 +25,64 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi fgSizeShowOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_bitmapRealisticMode = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapRealisticMode, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxRealisticMode = new wxCheckBox( this, wxID_ANY, _("Realistic mode"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxRealisticMode, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapCuThickness = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapCuThickness, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxCuThickness = new wxCheckBox( this, wxID_ANY, _("Show copper thickness"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxCuThickness, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmap3Dshapes = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmap3Dshapes, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmap3Dshapes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - m_checkBox3Dshapes = new wxCheckBox( this, wxID_ANY, _("Show component 3D shapes"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBox3Dshapes, 0, wxALL, 5 ); + m_checkBox3Dshapes = new wxCheckBox( this, wxID_ANY, _("Show 3D Models"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizeShowOpts->Add( m_checkBox3Dshapes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapAreas = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapAreas, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxAreas = new wxCheckBox( this, wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxAreas, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapSilkscreen = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapSilkscreen, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxSilkscreen = new wxCheckBox( this, wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxSilkscreen, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapSolderMask = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapSolderMask, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxSolderMask = new wxCheckBox( this, wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxSolderMask, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapSolderPaste = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapSolderPaste, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapSolderPaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxSolderpaste = new wxCheckBox( this, wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxSolderpaste, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxSolderpaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapAdhesive = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapAdhesive, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxAdhesive = new wxCheckBox( this, wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxAdhesive, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapComments = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapComments, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxComments = new wxCheckBox( this, wxID_ANY, _("Show comments and drawings layers"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxComments, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_bitmapECO = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_bitmapECO, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_bitmapECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_checkBoxECO = new wxCheckBox( this, wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizeShowOpts->Add( m_checkBoxECO, 0, wxALL, 5 ); + fgSizeShowOpts->Add( m_checkBoxECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); bSizerLeft->Add( fgSizeShowOpts, 1, wxEXPAND, 5 ); diff --git a/3d-viewer/dialogs/dialog_3D_view_option_base.fbp b/3d-viewer/dialogs/dialog_3D_view_option_base.fbp index 072b684437..2b8afa0c3f 100644 --- a/3d-viewer/dialogs/dialog_3D_view_option_base.fbp +++ b/3d-viewer/dialogs/dialog_3D_view_option_base.fbp @@ -120,7 +120,7 @@ 0 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -201,7 +201,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -289,7 +289,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -370,7 +370,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -458,7 +458,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -539,7 +539,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -570,7 +570,7 @@ 0 0 wxID_ANY - Show component 3D shapes + Show 3D Models 0 @@ -627,7 +627,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -708,7 +708,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -796,7 +796,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -877,7 +877,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -965,7 +965,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1046,7 +1046,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1134,7 +1134,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1215,7 +1215,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1303,7 +1303,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1384,7 +1384,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1472,7 +1472,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1553,7 +1553,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1641,7 +1641,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 @@ -1722,7 +1722,7 @@ 5 - wxALL + wxALL|wxALIGN_CENTER_VERTICAL 0 1 diff --git a/3d-viewer/dialogs/dialog_3D_view_option_base.h b/3d-viewer/dialogs/dialog_3D_view_option_base.h index ca8db71ae3..21ce622a59 100644 --- a/3d-viewer/dialogs/dialog_3D_view_option_base.h +++ b/3d-viewer/dialogs/dialog_3D_view_option_base.h @@ -38,7 +38,7 @@ class DIALOG_SHIM; class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM { private: - + protected: wxStaticBitmap* m_bitmapRealisticMode; wxCheckBox* m_checkBoxRealisticMode; @@ -66,19 +66,19 @@ class DIALOG_3D_VIEW_OPTIONS_BASE : public DIALOG_SHIM wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - + // Virtual event handlers, overide them in your derived class virtual void OnCheckRealisticMode( wxCommandEvent& event ) { event.Skip(); } virtual void OnShowAllClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnShowNoneClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("3D Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("3D Display Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_3D_VIEW_OPTIONS_BASE(); - + }; #endif //__DIALOG_3D_VIEW_OPTION_BASE_H__ diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp index 6c1f966544..e4da9a453c 100644 --- a/kicad/mainframe.cpp +++ b/kicad/mainframe.cpp @@ -409,30 +409,6 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event ) } -// Dead code: Cvpcb can be run only from the schematic editor now, -// This is due to the fact the footprint field of components in schematics -// are now always set by Cvpcb. -// ( The idea is to drop the .cmp files to avoid to have 2 places were -// footprints are stored, but only one: the schematic ) -/* -void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) -{ - wxFileName fn( GetProjectFileName() ); - - fn.SetExt( NetlistFileExtension ); - - KIWAY_PLAYER* frame = Kiway.Player( FRAME_CVPCB, false ); - if( !frame ) - { - frame = Kiway.Player( FRAME_CVPCB, true ); - frame->OpenProjectFiles( std::vector( 1, fn.GetFullPath() ) ); - frame->Show( true ); - } - - frame->Raise(); -} -*/ - #include void KICAD_MANAGER_FRAME::OnRunGerbview( wxCommandEvent& event )