Minor Pcbnew dialog fixes.
Fix get footprint by name dialog button sizer padding. Fix export gencad dialog file name, options, and button sizer padding.
This commit is contained in:
parent
80fa480388
commit
7eea8f808d
|
@ -2,6 +2,8 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 CERN
|
* Copyright (C) 2017 CERN
|
||||||
|
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
|
||||||
|
*
|
||||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -34,7 +36,8 @@
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
|
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent )
|
DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent )
|
||||||
: DIALOG_SHIM( aParent, wxID_ANY, _( "Export to GenCAD settings" ) )
|
: DIALOG_SHIM( aParent, wxID_ANY, _( "Export to GenCAD settings" ), wxDefaultPosition,
|
||||||
|
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
|
||||||
{
|
{
|
||||||
// Obtain a potential filename for the exported file
|
// Obtain a potential filename for the exported file
|
||||||
wxFileName fn = aParent->GetBoard()->GetFileName();
|
wxFileName fn = aParent->GetBoard()->GetFileName();
|
||||||
|
@ -48,23 +51,23 @@ DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aPar
|
||||||
wxBoxSizer* m_fileSizer = new wxBoxSizer( wxHORIZONTAL );
|
wxBoxSizer* m_fileSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_filePath = new wxTextCtrl( this, wxID_ANY, fn.GetFullPath() );
|
m_filePath = new wxTextCtrl( this, wxID_ANY, fn.GetFullPath() );
|
||||||
m_fileSizer->Add( m_filePath, 1, wxALL, 5 );
|
m_fileSizer->Add( m_filePath, 1, wxEXPAND | wxRIGHT, 5 );
|
||||||
|
|
||||||
wxButton* m_browseBtn = new wxButton( this, wxID_ANY, _( "Browse" ) );
|
wxButton* m_browseBtn = new wxButton( this, wxID_ANY, _( "Browse" ) );
|
||||||
m_browseBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
m_browseBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler( DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse ), NULL, this );
|
wxCommandEventHandler( DIALOG_GENCAD_EXPORT_OPTIONS::onBrowse ), NULL, this );
|
||||||
m_fileSizer->Add( m_browseBtn, 0, wxALL, 5 );
|
m_fileSizer->Add( m_browseBtn, 0 );
|
||||||
|
|
||||||
m_mainSizer->Add( m_fileSizer, 0, wxEXPAND, 5 );
|
m_mainSizer->Add( m_fileSizer, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_optsSizer = new wxGridSizer( 0, 1, 0, 0 );
|
m_optsSizer = new wxGridSizer( 0, 1, 3, 3 );
|
||||||
createOptCheckboxes();
|
createOptCheckboxes();
|
||||||
m_mainSizer->Add( m_optsSizer, 1, wxEXPAND, 5 );
|
m_mainSizer->Add( m_optsSizer, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
||||||
|
|
||||||
|
|
||||||
wxSizer* stdButtons = CreateSeparatedButtonSizer( wxOK | wxCANCEL );
|
wxSizer* stdButtons = CreateSeparatedButtonSizer( wxOK | wxCANCEL );
|
||||||
m_mainSizer->Add( stdButtons, 0, wxEXPAND, 5 );
|
m_mainSizer->Add( stdButtons, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
|
||||||
|
|
||||||
SetSizer( m_mainSizer );
|
SetSizer( m_mainSizer );
|
||||||
Layout();
|
Layout();
|
||||||
|
@ -139,7 +142,7 @@ void DIALOG_GENCAD_EXPORT_OPTIONS::createOptCheckboxes()
|
||||||
{
|
{
|
||||||
wxCheckBox* chkbox = new wxCheckBox( this, wxID_ANY, option.second );
|
wxCheckBox* chkbox = new wxCheckBox( this, wxID_ANY, option.second );
|
||||||
m_options[option.first] = chkbox;
|
m_options[option.first] = chkbox;
|
||||||
m_optsSizer->Add( chkbox, 0, wxALL, 5 );
|
m_optsSizer->Add( chkbox );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
// C++ code generated with wxFormBuilder (version Jun 27 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -47,7 +47,7 @@ DIALOG_GET_FOOTPRINT_BY_NAME_BASE::DIALOG_GET_FOOTPRINT_BY_NAME_BASE( wxWindow*
|
||||||
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
|
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
bSizerMain->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||||
|
@ -56,7 +56,7 @@ DIALOG_GET_FOOTPRINT_BY_NAME_BASE::DIALOG_GET_FOOTPRINT_BY_NAME_BASE( wxWindow*
|
||||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||||
m_sdbSizer->Realize();
|
m_sdbSizer->Realize();
|
||||||
|
|
||||||
bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( bSizerMain );
|
this->SetSizer( bSizerMain );
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
// C++ code generated with wxFormBuilder (version Jun 27 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
|
Loading…
Reference in New Issue