diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index df98b0f925..674c3ffd27 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -321,7 +321,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::deleteFieldButtonHandler( wxCommandEven if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too return; - if( fieldNdx <= VALUE ) + if( fieldNdx < MANDATORY_FIELDS ) { wxBell(); return; @@ -360,7 +360,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e if( fieldNdx >= m_FieldsBuf.size() ) // traps the -1 case too return; - if( fieldNdx <= MANDATORY_FIELDS ) + if( fieldNdx < MANDATORY_FIELDS ) { wxBell(); return; @@ -651,10 +651,10 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel() // only user defined fields may be moved, and not the top most user defined // field since it would be moving up into the fixed fields, > not >= - moveUpButton->Enable( fieldNdx > MANDATORY_FIELDS ); + moveUpButton->Enable( fieldNdx >= MANDATORY_FIELDS ); // if fieldNdx == REFERENCE, VALUE, then disable delete button - deleteFieldButton->Enable( fieldNdx > VALUE ); + deleteFieldButton->Enable( fieldNdx >= MANDATORY_FIELDS ); fieldValueTextCtrl->SetValue( field.m_Text ); diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 6d43a35483..04f360b4d1 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -206,7 +206,7 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx if( ( draw_mode & GR_ALLOW_HIGHCONTRAST ) && DisplayOpt.ContrastModeDisplay ) { - if( !IsOnLayer( curr_layer ) ) + if( !IsOnLayer( curr_layer ) && !IsOnLayer( EDGE_N ) ) { color &= ~MASKCOLOR; color |= DARKDARKGRAY; diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp index 98dde3e24c..a734b59b25 100644 --- a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp @@ -45,8 +45,8 @@ // The dialog to set options for global fields edition: // optionas are: -// edited fields (ref, value, others -// the footprint filter, for selective edition +// - edited fields (ref, value, others +// - the footprint filter, for selective edition class DIALOG_GLOBAL_MODULES_FIELDS_EDITION : public DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE { PCB_EDIT_FRAME* m_parent; @@ -64,7 +64,6 @@ public: { m_parent = parent; initDialog(); - GetSizer()->SetSizeHints( this ); } private: @@ -85,7 +84,7 @@ wxString DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_filterString; void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::initDialog() { - SetFocus(); + m_sdbSizerButtonsOK->SetDefault(); m_brdSettings = &m_parent->GetDesignSettings(); @@ -102,6 +101,10 @@ void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::initDialog() ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) ); m_TicknessValue->SetValue( ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) ); + + Layout(); + GetSizer()->SetSizeHints( this ); + Centre(); } diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp index e304301bdf..dd58594904 100644 --- a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp @@ -26,13 +26,13 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_ sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields:") ), wxVERTICAL ); m_ReferenceOpt = new wxCheckBox( this, wxID_ANY, _("Modify reference"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_ReferenceOpt, 0, wxALL, 5 ); + sbSizer1->Add( m_ReferenceOpt, 0, wxALL|wxEXPAND, 5 ); m_ValueOpt = new wxCheckBox( this, wxID_ANY, _("Modify value"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_ValueOpt, 0, wxALL, 5 ); + sbSizer1->Add( m_ValueOpt, 0, wxALL|wxEXPAND, 5 ); m_OtherFields = new wxCheckBox( this, wxID_ANY, _("Modify other fields"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_OtherFields, 0, wxALL, 5 ); + sbSizer1->Add( m_OtherFields, 0, wxALL|wxEXPAND, 5 ); bLeftSizer->Add( sbSizer1, 1, wxEXPAND|wxRIGHT, 5 ); @@ -44,9 +44,9 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_ bLeftSizer->Add( m_staticTextFilter, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_ModuleFilter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_ModuleFilter->SetMinSize( wxSize( 150,-1 ) ); + m_ModuleFilter->SetMinSize( wxSize( 180,-1 ) ); - bLeftSizer->Add( m_ModuleFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bLeftSizer->Add( m_ModuleFilter, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizerUpper->Add( bLeftSizer, 1, wxEXPAND, 5 ); @@ -59,6 +59,7 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_ wxFlexGridSizer* fgSizerCurrSettings; fgSizerCurrSettings = new wxFlexGridSizer( 3, 3, 0, 0 ); + fgSizerCurrSettings->AddGrowableCol( 1 ); fgSizerCurrSettings->SetFlexibleDirection( wxBOTH ); fgSizerCurrSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -99,7 +100,7 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_ sbSizerSettings->Add( fgSizerCurrSettings, 1, wxEXPAND, 5 ); - bRightSizer->Add( sbSizerSettings, 1, wxEXPAND|wxLEFT, 5 ); + bRightSizer->Add( sbSizerSettings, 0, wxEXPAND|wxLEFT, 5 ); bSizerUpper->Add( bRightSizer, 0, wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp index 7df7114895..1cb0a6b557 100644 --- a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp @@ -42,7 +42,7 @@ DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE - 482,199 + 409,199 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Global Module Fields Edition @@ -123,7 +123,7 @@ 5 - wxALL + wxALL|wxEXPAND 0 1 @@ -211,7 +211,7 @@ 5 - wxALL + wxALL|wxEXPAND 0 1 @@ -299,7 +299,7 @@ 5 - wxALL + wxALL|wxEXPAND 0 1 @@ -472,7 +472,7 @@ 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 0 1 @@ -508,7 +508,7 @@ 0 0 - 150,-1 + 180,-1 1 m_ModuleFilter 1 @@ -575,7 +575,7 @@ 5 wxEXPAND|wxLEFT - 1 + 0 wxID_ANY Current Design Settings: @@ -591,7 +591,7 @@ 3 wxBOTH - + 1 0 diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.h b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.h index d6d616cea1..1518ee6810 100644 --- a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.h +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.h @@ -63,7 +63,7 @@ class DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE : public DIALOG_SHIM public: - DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global Module Fields Edition"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 482,199 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global Module Fields Edition"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 409,199 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE(); };