diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 2020954d61..346769b937 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -268,7 +268,7 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText ) // If it is a double tilda, just process the second one } - unsigned dd = *chIt - ' '; + int dd = *chIt - ' '; if( dd >= m_glyphBoundingBoxes.size() || dd < 0 ) dd = '?' - ' '; @@ -336,7 +336,7 @@ VECTOR2D STROKE_FONT::computeTextSize( const UTF8& aText ) const } // Index in the bounding boxes table - unsigned dd = *it - ' '; + int dd = *it - ' '; if( dd >= m_glyphBoundingBoxes.size() || dd < 0 ) dd = '?' - ' '; diff --git a/cvpcb/class_components_listbox.cpp b/cvpcb/class_components_listbox.cpp index a99517370b..acc59a1c04 100644 --- a/cvpcb/class_components_listbox.cpp +++ b/cvpcb/class_components_listbox.cpp @@ -71,7 +71,7 @@ void COMPONENTS_LISTBOX::SetString( unsigned linecount, const wxString& text ) if( linecount >= m_ComponentList.Count() ) linecount = m_ComponentList.Count() - 1; - if( linecount >= 0 ) + if( m_ComponentList.Count() > 0 ) m_ComponentList[linecount] = text; } @@ -89,9 +89,9 @@ wxString COMPONENTS_LISTBOX::OnGetItemText( long item, long column ) const } -void COMPONENTS_LISTBOX::SetSelection( unsigned index, bool State ) +void COMPONENTS_LISTBOX::SetSelection( int index, bool State ) { - if( (int) index >= GetCount() ) + if( index >= GetCount() ) index = GetCount() - 1; if( (index >= 0) && (GetCount() > 0) ) @@ -164,7 +164,7 @@ void COMPONENTS_LISTBOX::OnChar( wxKeyEvent& event ) if( key == start_char ) { - SetSelection( ii, true ); // Ensure visible + SetSelection( (int) ii, true ); // Ensure visible break; } } diff --git a/cvpcb/class_footprints_listbox.cpp b/cvpcb/class_footprints_listbox.cpp index d09cee580b..2dfbf93bc5 100644 --- a/cvpcb/class_footprints_listbox.cpp +++ b/cvpcb/class_footprints_listbox.cpp @@ -101,9 +101,9 @@ wxString FOOTPRINTS_LISTBOX::OnGetItemText( long item, long column ) const } -void FOOTPRINTS_LISTBOX::SetSelection( unsigned index, bool State ) +void FOOTPRINTS_LISTBOX::SetSelection( int index, bool State ) { - if( (int) index >= GetCount() ) + if( index >= GetCount() ) index = GetCount() - 1; if( (index >= 0) && (GetCount() > 0) ) diff --git a/cvpcb/class_library_listbox.cpp b/cvpcb/class_library_listbox.cpp index 4149f285ca..e543b81459 100644 --- a/cvpcb/class_library_listbox.cpp +++ b/cvpcb/class_library_listbox.cpp @@ -95,9 +95,9 @@ wxString LIBRARY_LISTBOX::OnGetItemText( long item, long column ) const } -void LIBRARY_LISTBOX::SetSelection( unsigned index, bool State ) +void LIBRARY_LISTBOX::SetSelection( int index, bool State ) { - if( (int) index >= GetCount() ) + if( index >= GetCount() ) index = GetCount() - 1; if( (index >= 0) && (GetCount() > 0) ) diff --git a/cvpcb/cvstruct.h b/cvpcb/cvstruct.h index 7078a8d8a8..fcf9cf419d 100644 --- a/cvpcb/cvstruct.h +++ b/cvpcb/cvstruct.h @@ -78,7 +78,7 @@ public: ~FOOTPRINTS_LISTBOX(); int GetCount(); - void SetSelection( unsigned index, bool State = true ); + void SetSelection( int index, bool State = true ); void SetString( unsigned linecount, const wxString& text ); void AppendLine( const wxString& text ); @@ -127,7 +127,7 @@ public: ~LIBRARY_LISTBOX(); int GetCount(); - void SetSelection( unsigned index, bool State = true ); + void SetSelection( int index, bool State = true ); void SetString( unsigned linecount, const wxString& text ); void AppendLine( const wxString& text ); void SetLibraryList( const wxArrayString& aList ); @@ -187,7 +187,7 @@ public: /* * Enable or disable an item */ - void SetSelection( unsigned index, bool State = true ); + void SetSelection( int index, bool State = true ); void SetString( unsigned linecount, const wxString& text ); void AppendLine( const wxString& text ); diff --git a/eeschema/dialog_erc_listbox.h b/eeschema/dialog_erc_listbox.h index 9bd8a6b33f..3e8e250ca5 100644 --- a/eeschema/dialog_erc_listbox.h +++ b/eeschema/dialog_erc_listbox.h @@ -1,8 +1,25 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: dialog_erc.h -// Author: jean-pierre Charras -// Licence: GPL -///////////////////////////////////////////////////////////////////////////// +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 1992-2012 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 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 + */ #ifndef DIALOG_ERC_LISTBOX_H #define DIALOG_ERC_LISTBOX_H @@ -76,7 +93,7 @@ public: */ wxString OnGetItem( size_t n ) const { - if( m_MarkerList.size() > n && n >= 0 ) + if( m_MarkerList.size() > n ) { const SCH_MARKER* item = m_MarkerList[ n ]; if( item ) diff --git a/eeschema/dialogs/dialog_lib_edit_text_base.cpp b/eeschema/dialogs/dialog_lib_edit_text_base.cpp index 64f93d038a..85e80ca162 100644 --- a/eeschema/dialogs/dialog_lib_edit_text_base.cpp +++ b/eeschema/dialogs/dialog_lib_edit_text_base.cpp @@ -77,7 +77,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow sOptionsSizer->Add( m_Invisible, 0, wxALL, 5 ); - bBottomtBoxSizer->Add( sOptionsSizer, 1, wxALL|wxEXPAND, 5 ); + bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 ); wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; int m_TextShapeOptNChoices = sizeof( m_TextShapeOptChoices ) / sizeof( wxString ); diff --git a/eeschema/dialogs/dialog_lib_edit_text_base.fbp b/eeschema/dialogs/dialog_lib_edit_text_base.fbp index a2a6f9d714..8c53332832 100644 --- a/eeschema/dialogs/dialog_lib_edit_text_base.fbp +++ b/eeschema/dialogs/dialog_lib_edit_text_base.fbp @@ -495,7 +495,7 @@ 5 wxALL|wxEXPAND - 1 + 0 wxID_ANY Options diff --git a/pcbnew/dialogs/dialog_drc_base.cpp b/pcbnew/dialogs/dialog_drc_base.cpp index e5e93c25c5..0bbad3ce9c 100644 --- a/pcbnew/dialogs/dialog_drc_base.cpp +++ b/pcbnew/dialogs/dialog_drc_base.cpp @@ -1,10 +1,12 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "dialog_drclistbox.h" + #include "dialog_drc_base.h" /////////////////////////////////////////////////////////////////////////// @@ -36,6 +38,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_ClearanceTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetClearance = new wxTextCtrl( this, wxID_ANY, _("By Netclass"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SetClearance->SetMaxLength( 0 ); m_SetClearance->Enable( false ); fgMinValuesSizer->Add( m_SetClearance, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); @@ -47,6 +50,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_TrackMinWidthTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetTrackMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_SetTrackMinWidthCtrl->SetMaxLength( 0 ); fgMinValuesSizer->Add( m_SetTrackMinWidthCtrl, 0, wxALL|wxEXPAND, 5 ); m_ViaMinTitle = new wxStaticText( this, wxID_ANY, _("Min via size"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -56,6 +60,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_ViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetViaMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_SetViaMinSizeCtrl->SetMaxLength( 0 ); fgMinValuesSizer->Add( m_SetViaMinSizeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); m_MicroViaMinTitle = new wxStaticText( this, wxID_ANY, _("Min uVia size"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -65,6 +70,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i fgMinValuesSizer->Add( m_MicroViaMinTitle, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); m_SetMicroViakMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_SetMicroViakMinSizeCtrl->SetMaxLength( 0 ); fgMinValuesSizer->Add( m_SetMicroViakMinSizeCtrl, 0, wxALL|wxEXPAND, 5 ); @@ -79,6 +85,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i ReportFileSizer->Add( m_CreateRptCtrl, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); m_RptFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_RptFilenameCtrl->SetMaxLength( 0 ); m_RptFilenameCtrl->SetToolTip( _("Enter the report filename") ); m_RptFilenameCtrl->SetMinSize( wxSize( 180,-1 ) ); diff --git a/pcbnew/dialogs/dialog_drc_base.fbp b/pcbnew/dialogs/dialog_drc_base.fbp index ecadf69394..567c8e7985 100644 --- a/pcbnew/dialogs/dialog_drc_base.fbp +++ b/pcbnew/dialogs/dialog_drc_base.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 0 0 @@ -1247,7 +1249,7 @@ 0 - 0 + 0 220,-1 diff --git a/pcbnew/dialogs/dialog_drc_base.h b/pcbnew/dialogs/dialog_drc_base.h index 07a1cd1865..e86e117322 100644 --- a/pcbnew/dialogs/dialog_drc_base.h +++ b/pcbnew/dialogs/dialog_drc_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,7 +11,9 @@ #include #include #include -#include "dialog_drclistbox.h" +class DIALOG_SHIM; +class DRCLISTBOX; + #include "dialog_shim.h" #include #include diff --git a/pcbnew/dialogs/dialog_gendrill_base.cpp b/pcbnew/dialogs/dialog_gendrill_base.cpp index 126fce0196..5f1d4047c7 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.cpp +++ b/pcbnew/dialogs/dialog_gendrill_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 26 2014) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -190,7 +190,6 @@ DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID id, con bmsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL ); m_messagesBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); - m_messagesBox->SetMaxLength( 0 ); m_messagesBox->SetMinSize( wxSize( -1,90 ) ); bmsgSizer->Add( m_messagesBox, 1, wxALL|wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_gendrill_base.fbp b/pcbnew/dialogs/dialog_gendrill_base.fbp index 467f67066f..aa0178f3e2 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.fbp +++ b/pcbnew/dialogs/dialog_gendrill_base.fbp @@ -2133,7 +2133,7 @@ 0 - 0 + 0 -1,90 diff --git a/pcbnew/dialogs/dialog_gendrill_base.h b/pcbnew/dialogs/dialog_gendrill_base.h index fc61ef59de..7d5c27a9a7 100644 --- a/pcbnew/dialogs/dialog_gendrill_base.h +++ b/pcbnew/dialogs/dialog_gendrill_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Feb 26 2014) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index 243f306f69..716e38c6a1 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -173,7 +173,6 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bLowerSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_MessageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP ); - m_MessageWindow->SetMaxLength( 0 ); m_MessageWindow->SetMinSize( wxSize( 300,150 ) ); bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_netlist_fbp.fbp b/pcbnew/dialogs/dialog_netlist_fbp.fbp index 35f547a11d..cdc4eb9c25 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -20,8 +20,10 @@ . 1 + 1 1 1 + UI 1 0 @@ -1974,7 +1976,7 @@ 0 - 0 + 0 300,150 diff --git a/pcbnew/dialogs/dialog_netlist_fbp.h b/pcbnew/dialogs/dialog_netlist_fbp.h index 6ecadf84da..72977ac72a 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.h +++ b/pcbnew/dialogs/dialog_netlist_fbp.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Nov 6 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/utils/idftools/idf_parser.cpp b/utils/idftools/idf_parser.cpp index 37d4b0a24a..018be43aa2 100644 --- a/utils/idftools/idf_parser.cpp +++ b/utils/idftools/idf_parser.cpp @@ -1488,8 +1488,8 @@ bool IDF3_BOARD::setUnit( IDF3::IDF_UNIT aUnit, bool convert ) do { - std::map::iterator its = olnGroup.begin(); - std::map::iterator ite = olnGroup.end(); + std::multimap::iterator its = olnGroup.begin(); + std::multimap::iterator ite = olnGroup.end(); while( its != ite ) { @@ -2905,8 +2905,8 @@ void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) // PLACEMENT GROUP outlines do { - std::map::iterator its = olnGroup.begin(); - std::map::iterator ite = olnGroup.end(); + std::multimap::iterator its = olnGroup.begin(); + std::multimap::iterator ite = olnGroup.end(); while( its != ite ) { @@ -4102,8 +4102,8 @@ void IDF3_BOARD::Clear( void ) // delete PLACEMENT GROUP outlines do { - std::map::iterator os = olnGroup.begin(); - std::map::iterator oe = olnGroup.end(); + std::multimap::iterator os = olnGroup.begin(); + std::multimap::iterator oe = olnGroup.end(); while( os != oe ) {