Pcbnew: fix Bug #1272926 (Texts are now not accepted on edge cuts layer)
This commit is contained in:
parent
3354bdde05
commit
fe97521bda
|
@ -172,6 +172,15 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnCancelClick( wxCommandEvent& event )
|
|||
|
||||
void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event )
|
||||
{
|
||||
// Test for acceptable layer.
|
||||
// Incorrect layer can happen for old boards,
|
||||
// having texts on edge cut layer for instance
|
||||
if( m_LayerSelectionCtrl->GetLayerSelection() < 0 )
|
||||
{
|
||||
wxMessageBox( wxT("No layer selected, Please select the text layer") );
|
||||
return;
|
||||
}
|
||||
|
||||
wxPoint newPosition;
|
||||
wxSize newSize;
|
||||
|
||||
|
|
|
@ -325,6 +325,13 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
break;
|
||||
|
||||
case ID_PCB_ADD_TEXT_BUTT:
|
||||
if( IsLayerInList( EDGE_LAYER, getActiveLayer() ) )
|
||||
{
|
||||
DisplayError( this,
|
||||
_( "Texts not allowed on Edge Cut layers" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
if( (DrawStruct == NULL) || (DrawStruct->GetFlags() == 0) )
|
||||
{
|
||||
SetCurItem( CreateTextePcb( aDC ) );
|
||||
|
|
Loading…
Reference in New Issue