Commit 372ce659 authored by jean-pierre charras's avatar jean-pierre charras

Very minor changes in dialog zones.

parent 21d1402c
...@@ -251,12 +251,11 @@ void DIALOG_COPPER_ZONE::initDialog() ...@@ -251,12 +251,11 @@ void DIALOG_COPPER_ZONE::initDialog()
m_LayerSelectionCtrl->InsertColumn( 0, col0 ); m_LayerSelectionCtrl->InsertColumn( 0, col0 );
// Build copper layer list and append to layer widget // Build copper layer list and append to layer widget
int layerCount = board->GetCopperLayerCount(); int layerCount = board->GetCopperLayerCount();
int layerNumber, itemIndex;
wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL );
for( int ii = 0; ii < layerCount; ii++ ) for( int ii = 0; ii < layerCount; ii++ )
{ {
layerNumber = LAYER_N_BACK; int layerNumber = LAYER_N_BACK;
if( layerCount <= 1 || ii < layerCount - 1 ) if( layerCount <= 1 || ii < layerCount - 1 )
layerNumber = ii; layerNumber = ii;
...@@ -268,7 +267,7 @@ void DIALOG_COPPER_ZONE::initDialog() ...@@ -268,7 +267,7 @@ void DIALOG_COPPER_ZONE::initDialog()
msg = board->GetLayerName( layerNumber ).Trim(); msg = board->GetLayerName( layerNumber ).Trim();
EDA_COLOR_T layerColor = board->GetLayerColor( layerNumber ); EDA_COLOR_T layerColor = board->GetLayerColor( layerNumber );
imageList->Add( makeLayerBitmap( layerColor ) ); imageList->Add( makeLayerBitmap( layerColor ) );
itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii );
if( m_settings.m_CurrentZone_Layer == layerNumber ) if( m_settings.m_CurrentZone_Layer == layerNumber )
m_LayerSelectionCtrl->Select( itemIndex ); m_LayerSelectionCtrl->Select( itemIndex );
......
...@@ -149,13 +149,11 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() ...@@ -149,13 +149,11 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog()
m_LayerSelectionCtrl->InsertColumn( 0, col0 ); m_LayerSelectionCtrl->InsertColumn( 0, col0 );
// Build copper layer list and append to layer widget // Build copper layer list and append to layer widget
int layerCount = board->GetCopperLayerCount(); int layerCount = board->GetCopperLayerCount();
int layerNumber, itemIndex;
EDA_COLOR_T layerColor;
wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y );
m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL );
for( int ii = 0; ii < layerCount; ii++ ) for( int ii = 0; ii < layerCount; ii++ )
{ {
layerNumber = LAYER_N_BACK; int layerNumber = LAYER_N_BACK;
if( layerCount <= 1 || ii < layerCount - 1 ) if( layerCount <= 1 || ii < layerCount - 1 )
layerNumber = ii; layerNumber = ii;
...@@ -165,9 +163,9 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog() ...@@ -165,9 +163,9 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog()
m_LayerId.insert( m_LayerId.begin(), layerNumber ); m_LayerId.insert( m_LayerId.begin(), layerNumber );
msg = board->GetLayerName( layerNumber ); msg = board->GetLayerName( layerNumber );
layerColor = board->GetLayerColor( layerNumber ); EDA_COLOR_T layerColor = board->GetLayerColor( layerNumber );
imageList->Add( makeLayerBitmap( layerColor ) ); imageList->Add( makeLayerBitmap( layerColor ) );
itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii ); int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, ii );
if( m_zonesettings.m_CurrentZone_Layer == layerNumber ) if( m_zonesettings.m_CurrentZone_Layer == layerNumber )
m_LayerSelectionCtrl->Select( itemIndex ); m_LayerSelectionCtrl->Select( itemIndex );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012) // C++ code generated with wxFormBuilder (version Oct 8 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -40,23 +40,21 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind ...@@ -40,23 +40,21 @@ DIALOG_KEEPOUT_AREA_PROPERTIES_BASE::DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWind
wxBoxSizer* bSizerRight; wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL ); bSizerRight = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* m_OutilinesBoxOpt; m_staticTextprops = new wxStaticText( this, wxID_ANY, _("Properties:"), wxDefaultPosition, wxDefaultSize, 0 );
m_OutilinesBoxOpt = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Outlines Options:") ), wxVERTICAL ); m_staticTextprops->Wrap( -1 );
bSizerRight->Add( m_staticTextprops, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxString m_OrientEdgesOptChoices[] = { _("Any"), _("H, V and 45 deg") }; wxString m_OrientEdgesOptChoices[] = { _("Any"), _("H, V and 45 deg") };
int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString ); int m_OrientEdgesOptNChoices = sizeof( m_OrientEdgesOptChoices ) / sizeof( wxString );
m_OrientEdgesOpt = new wxRadioBox( this, wxID_ANY, _("Zone Edges Orient"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 1, wxRA_SPECIFY_COLS ); m_OrientEdgesOpt = new wxRadioBox( this, wxID_ANY, _("Zone Edges Orient"), wxDefaultPosition, wxDefaultSize, m_OrientEdgesOptNChoices, m_OrientEdgesOptChoices, 1, wxRA_SPECIFY_COLS );
m_OrientEdgesOpt->SetSelection( 0 ); m_OrientEdgesOpt->SetSelection( 0 );
m_OutilinesBoxOpt->Add( m_OrientEdgesOpt, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizerRight->Add( m_OrientEdgesOpt, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched Outline"), _("Full Hatched") }; wxString m_OutlineAppearanceCtrlChoices[] = { _("Line"), _("Hatched Outline"), _("Full Hatched") };
int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString ); int m_OutlineAppearanceCtrlNChoices = sizeof( m_OutlineAppearanceCtrlChoices ) / sizeof( wxString );
m_OutlineAppearanceCtrl = new wxRadioBox( this, wxID_ANY, _("Outlines Appearence"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 1, wxRA_SPECIFY_COLS ); m_OutlineAppearanceCtrl = new wxRadioBox( this, wxID_ANY, _("Outlines Appearence"), wxDefaultPosition, wxDefaultSize, m_OutlineAppearanceCtrlNChoices, m_OutlineAppearanceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_OutlineAppearanceCtrl->SetSelection( 1 ); m_OutlineAppearanceCtrl->SetSelection( 1 );
m_OutilinesBoxOpt->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); bSizerRight->Add( m_OutlineAppearanceCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizerRight->Add( m_OutilinesBoxOpt, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbSizerCutoutOpts; wxStaticBoxSizer* sbSizerCutoutOpts;
sbSizerCutoutOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Keepout Options:") ), wxVERTICAL ); sbSizerCutoutOpts = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Keepout Options:") ), wxVERTICAL );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012) // C++ code generated with wxFormBuilder (version Oct 8 2012)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
class DIALOG_SHIM;
class wxListView;
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
...@@ -21,8 +24,8 @@ ...@@ -21,8 +24,8 @@
#include <wx/listctrl.h> #include <wx/listctrl.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/radiobox.h> #include <wx/radiobox.h>
#include <wx/statbox.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/statbox.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
...@@ -45,6 +48,7 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM ...@@ -45,6 +48,7 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM
protected: protected:
wxStaticText* m_staticTextLayerSelection; wxStaticText* m_staticTextLayerSelection;
wxListView* m_LayerSelectionCtrl; wxListView* m_LayerSelectionCtrl;
wxStaticText* m_staticTextprops;
wxRadioBox* m_OrientEdgesOpt; wxRadioBox* m_OrientEdgesOpt;
wxRadioBox* m_OutlineAppearanceCtrl; wxRadioBox* m_OutlineAppearanceCtrl;
wxCheckBox* m_cbTracksCtrl; wxCheckBox* m_cbTracksCtrl;
...@@ -62,7 +66,7 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM ...@@ -62,7 +66,7 @@ class DIALOG_KEEPOUT_AREA_PROPERTIES_BASE : public DIALOG_SHIM
public: public:
DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 308,355 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ); DIALOG_KEEPOUT_AREA_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Keepout Area Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 308,338 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER );
~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE(); ~DIALOG_KEEPOUT_AREA_PROPERTIES_BASE();
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment