diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 5af7b4453c..0162b96f17 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -121,7 +121,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname, DIALOG_GET_COMPONENT dlg( this, GetComponentDialogPosition(), aHistoryList, msg, aUseLibBrowser ); - if( aHistoryList.GetCount() ) + if( aHistoryList.GetCount() ) dlg.SetComponentName( aHistoryList[0] ); if ( dlg.ShowModal() == wxID_CANCEL ) @@ -144,6 +144,9 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname, if( cmpName.IsEmpty() ) return wxEmptyString; + // Here, cmpName contains the component name, + // or "*" if the Select All dialog button was pressed + #ifndef KICAD_KEEPCASE cmpName.MakeUpper(); #endif @@ -175,7 +178,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname, libEntry = CMP_LIBRARY::FindLibraryComponent( cmpName, aLibname ); - if( ( libEntry == NULL ) && allowWildSeach ) /* Search with wildcard */ + if( ( libEntry == NULL ) && allowWildSeach ) // Search with wildcard { allowWildSeach = false; wxString wildname = wxChar( '*' ) + cmpName + wxChar( '*' ); @@ -191,7 +194,7 @@ wxString SCH_BASE_FRAME::SelectComponentFromLibrary( const wxString& aLibname, if( libEntry == NULL ) { - msg = _( "Failed to find part " ) + cmpName + _( " in library" ); + msg.Printf( _( "Failed to find part <%s> in library" ), GetChars( cmpName ) ); DisplayError( this, msg ); return wxEmptyString; } diff --git a/eeschema/selpart.cpp b/eeschema/selpart.cpp index b8f1ba4514..a3a89cae33 100644 --- a/eeschema/selpart.cpp +++ b/eeschema/selpart.cpp @@ -79,7 +79,7 @@ int GetNameOfPartToLoad( EDA_DRAW_FRAME* frame, CMP_LIBRARY* Library, wxString& static wxString OldCmpName; ii = DisplayComponentsNamesInLib( frame, Library, BufName, OldCmpName ); - if( ii <= 0 ) + if( ii <= 0 || BufName.IsEmpty() ) return 0; OldCmpName = BufName; diff --git a/pcbnew/class_zone.cpp b/pcbnew/class_zone.cpp index 7f721af36e..332154b6ae 100644 --- a/pcbnew/class_zone.cpp +++ b/pcbnew/class_zone.cpp @@ -641,6 +641,8 @@ void ZONE_CONTAINER::DisplayInfo( EDA_DRAW_FRAME* frame ) msg = _( "Zone Outline" ); + // Display Cutout instead of Outline for holes inside a zone + // i.e. when num contour !=0 int ncont = m_Poly->GetContour( m_CornerSelection ); if( ncont ) @@ -648,7 +650,27 @@ void ZONE_CONTAINER::DisplayInfo( EDA_DRAW_FRAME* frame ) frame->AppendMsgPanel( _( "Type" ), msg, DARKCYAN ); - if( IsOnCopperLayer() ) + if( GetIsKeepout() ) + { + msg.Empty(); + if( GetDoNotAllowVias() ) + msg = _("No via"); + if( GetDoNotAllowTracks() ) + { + if( !msg.IsEmpty() ) + msg += wxT(", "); + msg += _("No track"); + } + if( GetDoNotAllowCopperPour() ) + { + if( !msg.IsEmpty() ) + msg += wxT(", "); + msg += _("No copper pour"); + } + + frame->AppendMsgPanel( _( "Keepout" ), msg, RED ); + } + else if( IsOnCopperLayer() ) { if( GetNet() >= 0 ) { diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index c51872edd6..9cbab3b58c 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include @@ -545,11 +545,16 @@ void DIALOG_COPPER_ZONE::ExportSetupToOtherCopperZones( wxCommandEvent& event ) if( !AcceptOptions( true, true ) ) return; - // Export settings ( but layer and netcode ) to others zones: + // Export settings ( but layer and netcode ) to others copper zones BOARD* pcb = m_Parent->GetBoard(); for( int ii = 0; ii < pcb->GetAreaCount(); ii++ ) { ZONE_CONTAINER* zone = pcb->GetArea( ii ); + + // Cannot export settings from a copper zone + // to a zone keepout: + if( zone->GetIsKeepout() ) + continue; m_settings.ExportSetting( *zone, false ); // false = partial export m_Parent->OnModify(); }