diff --git a/pcbnew/dialogs/dialog_layer_selection_base.cpp b/pcbnew/dialogs/dialog_layer_selection_base.cpp index 6cce563e8f..a9823ef59e 100644 --- a/pcbnew/dialogs/dialog_layer_selection_base.cpp +++ b/pcbnew/dialogs/dialog_layer_selection_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -9,25 +9,25 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - + wxBoxSizer* bSizerMain; bSizerMain = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizerUpper; bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); - + m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 ); - + // Grid m_leftGridLayers->CreateGrid( 1, 3 ); m_leftGridLayers->EnableEditing( false ); m_leftGridLayers->EnableGridLines( false ); m_leftGridLayers->EnableDragGridSize( false ); m_leftGridLayers->SetMargins( 5, 3 ); - + // Columns m_leftGridLayers->SetColSize( 0, 24 ); m_leftGridLayers->SetColSize( 1, 20 ); @@ -35,30 +35,28 @@ DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWi m_leftGridLayers->EnableDragColMove( false ); m_leftGridLayers->EnableDragColSize( false ); m_leftGridLayers->SetColLabelSize( 0 ); - m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Rows m_leftGridLayers->EnableDragRowSize( false ); m_leftGridLayers->SetRowLabelSize( 0 ); - m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Label Appearance - m_leftGridLayers->SetLabelBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - + // Cell Defaults - m_leftGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); bSizerUpper->Add( m_leftGridLayers, 1, wxALL|wxEXPAND, 5 ); - + m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 ); - + // Grid m_rightGridLayers->CreateGrid( 1, 3 ); m_rightGridLayers->EnableEditing( false ); m_rightGridLayers->EnableGridLines( false ); m_rightGridLayers->EnableDragGridSize( false ); m_rightGridLayers->SetMargins( 5, 3 ); - + // Columns m_rightGridLayers->SetColSize( 0, 24 ); m_rightGridLayers->SetColSize( 1, 20 ); @@ -66,30 +64,29 @@ DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWi m_rightGridLayers->EnableDragColMove( false ); m_rightGridLayers->EnableDragColSize( false ); m_rightGridLayers->SetColLabelSize( 0 ); - m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Rows m_rightGridLayers->EnableDragRowSize( false ); m_rightGridLayers->SetRowLabelSize( 0 ); - m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Label Appearance - + // Cell Defaults - m_rightGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); bSizerUpper->Add( m_rightGridLayers, 1, wxALL|wxEXPAND, 5 ); - - + + bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxALL, 10 ); - - + + this->SetSizer( bSizerMain ); this->Layout(); bSizerMain->Fit( this ); - + this->Centre( wxBOTH ); - + // Connect Events m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftGridCellClick ), NULL, this ); m_leftGridLayers->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this ); @@ -104,35 +101,35 @@ DIALOG_LAYER_SELECTION_BASE::~DIALOG_LAYER_SELECTION_BASE() m_leftGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this ); m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnRightGridCellClick ), NULL, this ); m_rightGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this ); - + } -DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - + wxBoxSizer* bSizerMain; bSizerMain = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizerUpper; bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); - + wxBoxSizer* bSizerLeft; bSizerLeft = new wxBoxSizer( wxVERTICAL ); - + m_staticTextTopLayer = new wxStaticText( this, wxID_ANY, _("Top/Front layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextTopLayer->Wrap( -1 ); bSizerLeft->Add( m_staticTextTopLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 ); - + // Grid m_leftGridLayers->CreateGrid( 1, 3 ); m_leftGridLayers->EnableEditing( false ); m_leftGridLayers->EnableGridLines( false ); m_leftGridLayers->EnableDragGridSize( false ); m_leftGridLayers->SetMargins( 3, 3 ); - + // Columns m_leftGridLayers->SetColSize( 0, 24 ); m_leftGridLayers->SetColSize( 1, 20 ); @@ -140,40 +137,38 @@ DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE m_leftGridLayers->EnableDragColMove( false ); m_leftGridLayers->EnableDragColSize( false ); m_leftGridLayers->SetColLabelSize( 0 ); - m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Rows m_leftGridLayers->EnableDragRowSize( false ); m_leftGridLayers->SetRowLabelSize( 0 ); - m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Label Appearance - m_leftGridLayers->SetLabelBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); - + // Cell Defaults - m_leftGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); - m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - bSizerLeft->Add( m_leftGridLayers, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizerUpper->Add( bSizerLeft, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - + m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER ); + bSizerLeft->Add( m_leftGridLayers, 0, wxALL|wxEXPAND, 5 ); + + + bSizerUpper->Add( bSizerLeft, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + wxBoxSizer* bSizerRight; bSizerRight = new wxBoxSizer( wxVERTICAL ); - + m_staticTextBottomLayer = new wxStaticText( this, wxID_ANY, _("Bottom/Back layer:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextBottomLayer->Wrap( -1 ); bSizerRight->Add( m_staticTextBottomLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - + m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 ); - + // Grid m_rightGridLayers->CreateGrid( 1, 3 ); m_rightGridLayers->EnableEditing( false ); m_rightGridLayers->EnableGridLines( false ); m_rightGridLayers->EnableDragGridSize( false ); m_rightGridLayers->SetMargins( 3, 3 ); - + // Columns m_rightGridLayers->SetColSize( 0, 24 ); m_rightGridLayers->SetColSize( 1, 20 ); @@ -181,45 +176,44 @@ DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE m_rightGridLayers->EnableDragColMove( false ); m_rightGridLayers->EnableDragColSize( false ); m_rightGridLayers->SetColLabelSize( 0 ); - m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Rows m_rightGridLayers->EnableDragRowSize( false ); m_rightGridLayers->SetRowLabelSize( 0 ); - m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE ); - + m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); + // Label Appearance - + // Cell Defaults - m_rightGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) ); - m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); - bSizerRight->Add( m_rightGridLayers, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizerUpper->Add( bSizerRight, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - - bSizerMain->Add( bSizerUpper, 0, wxALL|wxEXPAND, 5 ); - - m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); - + m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER ); + bSizerRight->Add( m_rightGridLayers, 0, wxALL|wxEXPAND, 5 ); + + + bSizerUpper->Add( bSizerRight, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + + bSizerMain->Add( bSizerUpper, 1, wxALL|wxEXPAND, 5 ); + + m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMain->Add( m_staticline, 0, wxEXPAND | wxALL, 5 ); + m_sdbSizer = new wxStdDialogButtonSizer(); m_sdbSizerOK = new wxButton( this, wxID_OK ); m_sdbSizer->AddButton( m_sdbSizerOK ); m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer->AddButton( m_sdbSizerCancel ); m_sdbSizer->Realize(); - - bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - + + bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 ); + + this->SetSizer( bSizerMain ); this->Layout(); bSizerMain->Fit( this ); - + this->Centre( wxBOTH ); - + // Connect Events m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this ); m_rightGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this ); @@ -230,5 +224,5 @@ DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::~DIALOG_COPPER_LAYER_PAIR_SELECTION_BAS // Disconnect Events m_leftGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this ); m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this ); - + } diff --git a/pcbnew/dialogs/dialog_layer_selection_base.fbp b/pcbnew/dialogs/dialog_layer_selection_base.fbp index e08e4e5633..f6e7d11d7a 100644 --- a/pcbnew/dialogs/dialog_layer_selection_base.fbp +++ b/pcbnew/dialogs/dialog_layer_selection_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,8 @@ dialog_layer_selection_base 1000 none + + 1 dialog_layer_selection_base @@ -24,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -46,48 +49,12 @@ -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + DIALOG_SHIM; dialog_shim.h; forward_declare Select Layer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerMain @@ -121,17 +88,17 @@ 1 - wxSYS_COLOUR_MENU + wxALIGN_LEFT wxALIGN_TOP 0 1 - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 3 24,20,72 @@ -154,7 +121,7 @@ 0 0 ID_LEFT_LIST - wxSYS_COLOUR_WINDOW + 3 @@ -174,10 +141,10 @@ 1 Resizable - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 1 1 @@ -188,61 +155,8 @@ - - - - OnLeftGridCellClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OnLeftButtonReleased - - - - - - - - - - - - - @@ -264,17 +178,17 @@ 1 - wxSYS_COLOUR_MENU + wxALIGN_LEFT wxALIGN_TOP 0 1 - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 3 24,20,72 @@ -317,10 +231,10 @@ 1 Resizable - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 1 1 @@ -331,61 +245,8 @@ - - - - OnRightGridCellClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OnLeftButtonReleased - - - - - - - - - - - - - @@ -412,48 +273,12 @@ -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + DIALOG_SHIM; dialog_shim.h; forward_declare Select Copper Layer Pair - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerMain @@ -462,7 +287,7 @@ 5 wxALL|wxEXPAND - 0 + 1 bSizerUpper @@ -471,7 +296,7 @@ 5 wxEXPAND|wxRIGHT|wxLEFT - 0 + 1 bSizerLeft @@ -510,6 +335,7 @@ 0 wxID_ANY Top/Front layer: + 0 0 @@ -535,34 +361,11 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL + wxALL|wxEXPAND 0 1 @@ -579,17 +382,17 @@ 1 - wxSYS_COLOUR_MENU + wxALIGN_LEFT - wxALIGN_CENTRE + wxALIGN_CENTER 0 1 - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 3 24,20,72 @@ -612,7 +415,7 @@ 0 0 ID_LEFT_LIST - wxSYS_COLOUR_WINDOW + 3 @@ -632,10 +435,10 @@ 1 Resizable - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 1 1 @@ -646,61 +449,7 @@ - - - - OnLeftGridCellClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -708,7 +457,7 @@ 5 wxEXPAND|wxRIGHT|wxLEFT - 0 + 1 bSizerRight @@ -747,6 +496,7 @@ 0 wxID_ANY Bottom/Back layer: + 0 0 @@ -772,34 +522,11 @@ -1 - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL + wxALL|wxEXPAND 0 1 @@ -816,17 +543,17 @@ 1 - wxSYS_COLOUR_MENU + wxALIGN_LEFT - wxALIGN_CENTRE + wxALIGN_CENTER 0 1 - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 3 24,20,72 @@ -869,10 +596,10 @@ 1 Resizable - wxALIGN_CENTRE + wxALIGN_CENTER 0 - wxALIGN_CENTRE + wxALIGN_CENTER 1 1 @@ -883,61 +610,7 @@ - - - - OnRightGridCellClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -983,7 +656,7 @@ 0 1 - m_staticline1 + m_staticline 1 @@ -1000,34 +673,11 @@ - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT 0 0 @@ -1041,14 +691,6 @@ m_sdbSizer protected - - - - - - - - diff --git a/pcbnew/dialogs/dialog_layer_selection_base.h b/pcbnew/dialogs/dialog_layer_selection_base.h index c529a629c7..6df25a4bf8 100644 --- a/pcbnew/dialogs/dialog_layer_selection_base.h +++ b/pcbnew/dialogs/dialog_layer_selection_base.h @@ -1,16 +1,16 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Dec 30 2017) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_LAYER_SELECTION_BASE_H__ -#define __DIALOG_LAYER_SELECTION_BASE_H__ +#pragma once #include #include #include +#include "dialog_shim.h" #include #include #include @@ -31,54 +31,53 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_LAYER_SELECTION_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_LAYER_SELECTION_BASE : public wxDialog +class DIALOG_LAYER_SELECTION_BASE : public DIALOG_SHIM { private: - + protected: wxGrid* m_leftGridLayers; wxGrid* m_rightGridLayers; - + // Virtual event handlers, overide them in your derived class virtual void OnLeftGridCellClick( wxGridEvent& event ) { event.Skip(); } virtual void OnLeftButtonReleased( wxMouseEvent& event ) { event.Skip(); } virtual void OnRightGridCellClick( wxGridEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Layer"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Layer"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_LAYER_SELECTION_BASE(); - + }; /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE : public wxDialog +class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE : public DIALOG_SHIM { private: - + protected: wxStaticText* m_staticTextTopLayer; wxGrid* m_leftGridLayers; wxStaticText* m_staticTextBottomLayer; wxGrid* m_rightGridLayers; - wxStaticLine* m_staticline1; + wxStaticLine* m_staticline; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; wxButton* m_sdbSizerCancel; - + // Virtual event handlers, overide them in your derived class virtual void OnLeftGridCellClick( wxGridEvent& event ) { event.Skip(); } virtual void OnRightGridCellClick( wxGridEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Copper Layer Pair"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Copper Layer Pair"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE(); - + }; -#endif //__DIALOG_LAYER_SELECTION_BASE_H__ diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index 0db55d5a0f..4292507c77 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -1,29 +1,25 @@ /** * @file sel_layer.cpp - * @brief dialogs for one layer selection and a layer pair selection. + * @brief minor dialogs for one layer selection and a layer pair selection. */ /* * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors. * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . */ @@ -185,6 +181,10 @@ void PCB_ONE_LAYER_SELECTOR::buildList() if( right_row <= 0 ) m_rightGridLayers->Show( false ); + + // Now fix min grid layer name column size (it also sets a minimal size) + m_leftGridLayers->AutoSizeColumn( LAYERNAME_COLNUM ); + m_rightGridLayers->AutoSizeColumn( LAYERNAME_COLNUM ); } @@ -351,6 +351,10 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::buildList() row++; } + + // Now fix min grid layer name column size (it also sets a minimal size) + m_leftGridLayers->AutoSizeColumn( LAYERNAME_COLNUM ); + m_rightGridLayers->AutoSizeColumn( LAYERNAME_COLNUM ); }