DIALOG_GRAPHIC_ITEM_PROPERTIES: fix a not very understandable error message (especially when Dwgs.User layer is disabled).

Rename the method PCB_LAYER_BOX_SELECTOR::SetLayerSet to the better name SetNotAllowedLayerSet
This commit is contained in:
jean-pierre charras 2018-03-31 10:46:52 +02:00
parent b813eac254
commit 62c5a706d5
8 changed files with 15 additions and 13 deletions

View File

@ -195,7 +195,7 @@ bool DIALOG_EDIT_FPTEXT::TransferDataToWindow()
m_LayerSelectionCtrl->ShowNonActivatedLayers( true );
m_LayerSelectionCtrl->SetLayersHotkeys( false );
m_LayerSelectionCtrl->SetLayerSet( forbiddenLayers );
m_LayerSelectionCtrl->SetNotAllowedLayerSet( forbiddenLayers );
m_LayerSelectionCtrl->SetBoardFrame( m_boardEditor );
m_LayerSelectionCtrl->Resync();

View File

@ -204,15 +204,17 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow()
// Configure the layers list selector
m_LayerSelectionCtrl->SetLayersHotkeys( false );
m_LayerSelectionCtrl->SetLayerSet( LSET::AllCuMask() );
m_LayerSelectionCtrl->SetNotAllowedLayerSet( LSET::AllCuMask() );
m_LayerSelectionCtrl->SetBoardFrame( m_parent );
m_LayerSelectionCtrl->Resync();
if( m_LayerSelectionCtrl->SetLayerSelection( m_item->GetLayer() ) < 0 )
{
wxMessageBox( _( "This item was on an unknown layer.\n"
"It has been moved to the drawings layer. Please fix it." ) );
m_LayerSelectionCtrl->SetLayerSelection( Dwgs_User );
wxMessageBox( _( "This item was on a not allowed or non existing layer.\n"
"It has been moved to the first allowed layer.\n\n"
"Please fix it." ) );
//m_LayerSelectionCtrl->SetLayerSelection( Dwgs_User );
m_LayerSelectionCtrl->SetSelection( 0 );
}
return DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::TransferDataToWindow();

View File

@ -199,7 +199,7 @@ bool DIALOG_MODEDIT_FP_BODY_ITEM_PROPERTIES::TransferDataToWindow()
// Configure the layers list selector
m_LayerSelectionCtrl->SetLayersHotkeys( false );
m_LayerSelectionCtrl->SetLayerSet( LSET::InternalCuMask().set( Edge_Cuts ) );
m_LayerSelectionCtrl->SetNotAllowedLayerSet( LSET::InternalCuMask().set( Edge_Cuts ) );
m_LayerSelectionCtrl->SetBoardFrame( m_parent );
m_LayerSelectionCtrl->Resync();

View File

@ -185,7 +185,7 @@ bool DIALOG_PCB_TEXT_PROPERTIES::TransferDataToWindow()
m_LayerSelectionCtrl->SetLayersHotkeys( false );
// A text has no sense on edge cut layer
m_LayerSelectionCtrl->SetLayerSet( Edge_Cuts );
m_LayerSelectionCtrl->SetNotAllowedLayerSet( Edge_Cuts );
m_LayerSelectionCtrl->SetBoardFrame( m_Parent );
m_LayerSelectionCtrl->Resync();
m_LayerSelectionCtrl->SetLayerSelection( m_SelectedPCBText->GetLayer() );

View File

@ -248,11 +248,11 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
m_ViaStartLayer->SetLayersHotkeys( false );
m_ViaStartLayer->SetLayerSet( LSET::AllNonCuMask() );
m_ViaStartLayer->SetNotAllowedLayerSet( LSET::AllNonCuMask() );
m_ViaStartLayer->SetBoardFrame( aParent );
m_ViaStartLayer->Resync();
m_ViaEndLayer->SetLayersHotkeys( false );
m_ViaEndLayer->SetLayerSet( LSET::AllNonCuMask() );
m_ViaEndLayer->SetNotAllowedLayerSet( LSET::AllNonCuMask() );
m_ViaEndLayer->SetBoardFrame( aParent );
m_ViaEndLayer->Resync();
@ -291,7 +291,7 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
}
m_TrackLayerCtrl->SetLayersHotkeys( false );
m_TrackLayerCtrl->SetLayerSet( LSET::AllNonCuMask() );
m_TrackLayerCtrl->SetNotAllowedLayerSet( LSET::AllNonCuMask() );
m_TrackLayerCtrl->SetBoardFrame( aParent );
m_TrackLayerCtrl->Resync();

View File

@ -141,7 +141,7 @@ DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR( PCB_EDIT_FRAME* aParent,
m_SelLayerBox->ShowNonActivatedLayers( true );
m_SelLayerBox->SetLayersHotkeys( false );
m_SelLayerBox->SetLayerSet( LSET::AllCuMask().set( Edge_Cuts ) );
m_SelLayerBox->SetNotAllowedLayerSet( LSET::AllCuMask().set( Edge_Cuts ) );
m_SelLayerBox->SetBoardFrame( m_parent );
m_SelLayerBox->Resync();

View File

@ -93,7 +93,7 @@ DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_BASE_FRAME* aParent, bool aImportAsFoo
// Configure the layers list selector
m_SelLayerBox->SetLayersHotkeys( false ); // Do not display hotkeys
m_SelLayerBox->SetLayerSet( LSET::AllCuMask() ); // Do not use copper layers
m_SelLayerBox->SetNotAllowedLayerSet( LSET::AllCuMask() ); // Do not use copper layers
m_SelLayerBox->SetBoardFrame( m_parent );
m_SelLayerBox->Resync();

View File

@ -72,7 +72,7 @@ public:
// SetLayerSet allows disableing some layers, which are not
// shown in list
void SetLayerSet( LSET aMask ) { m_layerMaskDisable = aMask; }
void SetNotAllowedLayerSet( LSET aMask ) { m_layerMaskDisable = aMask; }
// Reload the Layers names and bitmaps
// Virtual function