Restored previous function names.
This commit is contained in:
parent
c00533a150
commit
b39d562aea
|
@ -136,13 +136,13 @@ protected:
|
|||
* will change the currently active layer to \a aLayer and also
|
||||
* update the PCB_LAYER_WIDGET.
|
||||
*/
|
||||
void setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true );
|
||||
void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true );
|
||||
|
||||
/**
|
||||
* Function getActiveLayer
|
||||
* returns the active layer
|
||||
*/
|
||||
LAYER_NUM getCurrentLayer()
|
||||
LAYER_NUM getActiveLayer()
|
||||
{
|
||||
return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer;
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
|
|||
if( IsCopperLayer( layer ) )
|
||||
{
|
||||
bool loc_visible = visible;
|
||||
if( force_active_layer_visible && (layer == myframe->getCurrentLayer() ) )
|
||||
if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) )
|
||||
loc_visible = true;
|
||||
|
||||
cb->SetValue( loc_visible );
|
||||
|
@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
|
|||
{
|
||||
// the layer change from the PCB_LAYER_WIDGET can be denied by returning
|
||||
// false from this function.
|
||||
myframe->setCurrentLayer( aLayer, false );
|
||||
myframe->setActiveLayer( aLayer, false );
|
||||
|
||||
if( m_alwaysShowActiveCopperLayer )
|
||||
OnLayerSelected();
|
||||
|
|
|
@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
|
|||
{
|
||||
if( g_CurrentTrackList.GetCount() > 0 )
|
||||
{
|
||||
LAYER_NUM previous_layer = getCurrentLayer();
|
||||
LAYER_NUM previous_layer = getActiveLayer();
|
||||
|
||||
DBG( g_CurrentTrackList.VerifyListIntegrity(); )
|
||||
|
||||
|
@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
|
|||
|
||||
// Correct active layer which could change if a via
|
||||
// has been erased
|
||||
setCurrentLayer( previous_layer );
|
||||
setActiveLayer( previous_layer );
|
||||
|
||||
UpdateStatusBar();
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
|||
// Apply new display options to the GAL canvas (this is faster than recaching)
|
||||
settings->LoadDisplayOptions( DisplayOpt );
|
||||
|
||||
setHighContrastLayer( getCurrentLayer() );
|
||||
setHighContrastLayer( getActiveLayer() );
|
||||
// m_galCanvas->GetView()->EnableTopLayer( state );
|
||||
|
||||
if( m_galCanvasActive )
|
||||
|
|
|
@ -37,7 +37,7 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent )
|
|||
void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos )
|
||||
{
|
||||
DIALOG_GLOBAL_DELETION dlg( this );
|
||||
dlg.SetCurrentLayer( getCurrentLayer() );
|
||||
dlg.SetCurrentLayer( getActiveLayer() );
|
||||
|
||||
dlg.ShowModal();
|
||||
}
|
||||
|
|
|
@ -669,11 +669,11 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
|
|||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
wxLogDebug( wxT( "Current layer selected %d." ), getCurrentLayer() );
|
||||
wxLogDebug( wxT( "Current layer selected %d." ), getActiveLayer() );
|
||||
|
||||
// If the current active layer was removed, find the next avaiable layer to set as the
|
||||
// active layer.
|
||||
if( !( GetLayerMask( getCurrentLayer() ) & GetBoard()->GetEnabledLayers() ) )
|
||||
if( !( GetLayerMask( getActiveLayer() ) & GetBoard()->GetEnabledLayers() ) )
|
||||
{
|
||||
for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i )
|
||||
{
|
||||
|
@ -684,14 +684,14 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
|
|||
|
||||
if( GetLayerMask( tmp ) & GetBoard()->GetEnabledLayers() )
|
||||
{
|
||||
wxLogDebug( wxT( "Setting current layer to %d." ), getCurrentLayer() );
|
||||
setCurrentLayer( tmp, true );
|
||||
wxLogDebug( wxT( "Setting current layer to %d." ), getActiveLayer() );
|
||||
setActiveLayer( tmp, true );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setCurrentLayer( getCurrentLayer(), true );
|
||||
setActiveLayer( getActiveLayer(), true );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC )
|
|||
aDimension = new DIMENSION( GetBoard() );
|
||||
aDimension->SetFlags( IS_NEW );
|
||||
|
||||
aDimension->SetLayer( getCurrentLayer() );
|
||||
aDimension->SetLayer( getActiveLayer() );
|
||||
|
||||
aDimension->m_crossBarO = aDimension->m_crossBarF = pos;
|
||||
aDimension->m_featureLineDO = aDimension->m_featureLineDF = pos;
|
||||
|
|
|
@ -917,10 +917,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_POPUP_PCB_SELECT_LAYER:
|
||||
itmp = SelectLayer( getCurrentLayer(), UNDEFINED_LAYER, UNDEFINED_LAYER );
|
||||
itmp = SelectLayer( getActiveLayer(), UNDEFINED_LAYER, UNDEFINED_LAYER );
|
||||
|
||||
if( itmp >= 0 )
|
||||
setCurrentLayer( itmp );
|
||||
setActiveLayer( itmp );
|
||||
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
break;
|
||||
|
@ -930,19 +930,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_POPUP_PCB_SELECT_NO_CU_LAYER:
|
||||
itmp = SelectLayer( getCurrentLayer(), FIRST_NON_COPPER_LAYER, UNDEFINED_LAYER );
|
||||
itmp = SelectLayer( getActiveLayer(), FIRST_NON_COPPER_LAYER, UNDEFINED_LAYER );
|
||||
|
||||
if( itmp >= 0 )
|
||||
setCurrentLayer( itmp );
|
||||
setActiveLayer( itmp );
|
||||
|
||||
m_canvas->MoveCursorToCrossHair();
|
||||
break;
|
||||
|
||||
case ID_POPUP_PCB_SELECT_CU_LAYER:
|
||||
itmp = SelectLayer( getCurrentLayer(), UNDEFINED_LAYER, LAST_COPPER_LAYER );
|
||||
itmp = SelectLayer( getActiveLayer(), UNDEFINED_LAYER, LAST_COPPER_LAYER );
|
||||
|
||||
if( itmp >= 0 )
|
||||
setCurrentLayer( itmp );
|
||||
setActiveLayer( itmp );
|
||||
|
||||
break;
|
||||
|
||||
|
@ -952,7 +952,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_TOOLBARH_PCB_SELECT_LAYER:
|
||||
setCurrentLayer( m_SelLayerBox->GetLayerSelection() );
|
||||
setActiveLayer( m_SelLayerBox->GetLayerSelection() );
|
||||
|
||||
if( DisplayOpt.ContrastModeDisplay )
|
||||
m_canvas->Refresh( true );
|
||||
|
@ -1244,7 +1244,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
|
|||
|
||||
void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
|
||||
{
|
||||
LAYER_NUM curLayer = getCurrentLayer();
|
||||
LAYER_NUM curLayer = getActiveLayer();
|
||||
|
||||
// Check if the specified layer matches the present layer
|
||||
if( layer == curLayer )
|
||||
|
@ -1286,7 +1286,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
|
|||
GetScreen()->m_Route_Layer_TOP = curLayer;
|
||||
GetScreen()->m_Route_Layer_BOTTOM = layer;
|
||||
|
||||
setCurrentLayer( curLayer );
|
||||
setActiveLayer( curLayer );
|
||||
|
||||
if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) )
|
||||
{
|
||||
|
@ -1307,7 +1307,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
|
|||
// and a non-copper layer, or vice-versa?
|
||||
// ...
|
||||
|
||||
setCurrentLayer( layer );
|
||||
setActiveLayer( layer );
|
||||
|
||||
if( DisplayOpt.ContrastModeDisplay )
|
||||
RefreshCanvas();
|
||||
|
|
|
@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s
|
|||
|
||||
s_large = GetDesignSettings().m_DrawSegmentWidth;
|
||||
|
||||
if( getCurrentLayer() == EDGE_N )
|
||||
if( getActiveLayer() == EDGE_N )
|
||||
{
|
||||
s_large = GetDesignSettings().m_EdgeSegmentWidth;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s
|
|||
{
|
||||
SetCurItem( Segment = new DRAWSEGMENT( GetBoard() ) );
|
||||
Segment->SetFlags( IS_NEW );
|
||||
Segment->SetLayer( getCurrentLayer() );
|
||||
Segment->SetLayer( getActiveLayer() );
|
||||
Segment->SetWidth( s_large );
|
||||
Segment->SetShape( shape );
|
||||
Segment->SetAngle( 900 );
|
||||
|
|
|
@ -52,10 +52,10 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
|
|||
|
||||
if( aTrack == NULL )
|
||||
{
|
||||
if( getCurrentLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP )
|
||||
setCurrentLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP );
|
||||
if( getActiveLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP )
|
||||
setActiveLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP );
|
||||
else
|
||||
setCurrentLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM );
|
||||
setActiveLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM );
|
||||
|
||||
UpdateStatusBar();
|
||||
return true;
|
||||
|
@ -109,7 +109,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
|
|||
via->SetLayerPair( LAYER_N_BACK, LAYER_N_FRONT );
|
||||
via->SetDrill( GetBoard()->GetCurrentViaDrill() );
|
||||
|
||||
LAYER_NUM first_layer = getCurrentLayer();
|
||||
LAYER_NUM first_layer = getActiveLayer();
|
||||
LAYER_NUM last_layer;
|
||||
|
||||
// prepare switch to new active layer:
|
||||
|
@ -172,7 +172,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
|
|||
return false;
|
||||
}
|
||||
|
||||
setCurrentLayer( last_layer );
|
||||
setActiveLayer( last_layer );
|
||||
|
||||
TRACK* lastNonVia = g_CurrentTrackSegment;
|
||||
|
||||
|
@ -194,7 +194,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
|
|||
*/
|
||||
|
||||
// set the layer to the new value
|
||||
track->SetLayer( getCurrentLayer() );
|
||||
track->SetLayer( getActiveLayer() );
|
||||
|
||||
/* the start point is the via position and the end point is the cursor
|
||||
* which also is on the via (will change when moving mouse)
|
||||
|
|
|
@ -240,7 +240,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
|||
break;
|
||||
|
||||
case HK_SWITCH_LAYER_TO_PREVIOUS:
|
||||
ll = getCurrentLayer();
|
||||
ll = getActiveLayer();
|
||||
|
||||
if( (ll <= LAYER_N_BACK) || (ll > LAYER_N_FRONT) )
|
||||
break;
|
||||
|
@ -256,7 +256,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
|||
break;
|
||||
|
||||
case HK_SWITCH_LAYER_TO_NEXT:
|
||||
ll = getCurrentLayer();
|
||||
ll = getActiveLayer();
|
||||
|
||||
if( (ll < LAYER_N_BACK) || (ll >= LAYER_N_FRONT) )
|
||||
break;
|
||||
|
@ -374,7 +374,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
|||
break;
|
||||
|
||||
case HK_BACK_SPACE:
|
||||
if( /*m_ID_current_state == ID_TRACK_BUTT &&*/ (getCurrentLayer() <= LAYER_N_FRONT) )
|
||||
if( /*m_ID_current_state == ID_TRACK_BUTT &&*/ (getActiveLayer() <= LAYER_N_FRONT) )
|
||||
{
|
||||
if( !itemCurrentlyEdited )
|
||||
{
|
||||
|
@ -580,7 +580,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC )
|
|||
switch( GetToolId() )
|
||||
{
|
||||
case ID_TRACK_BUTT:
|
||||
if( getCurrentLayer() > LAYER_N_FRONT )
|
||||
if( getActiveLayer() > LAYER_N_FRONT )
|
||||
return false;
|
||||
|
||||
if( ItemFree )
|
||||
|
@ -949,7 +949,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC )
|
|||
*/
|
||||
TRACK * PCB_EDIT_FRAME::OnHotkeyBeginRoute( wxDC* aDC )
|
||||
{
|
||||
if( getCurrentLayer() > LAYER_N_FRONT )
|
||||
if( getActiveLayer() > LAYER_N_FRONT )
|
||||
return NULL;
|
||||
|
||||
bool itemCurrentlyEdited = (GetCurItem() && GetCurItem()->GetFlags());
|
||||
|
|
|
@ -243,7 +243,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
if( GetToolId() == ID_PCB_ARC_BUTT )
|
||||
shape = S_ARC;
|
||||
|
||||
if( IsCopperLayer( getCurrentLayer() ) )
|
||||
if( IsCopperLayer( getActiveLayer() ) )
|
||||
{
|
||||
DisplayError( this, _( "Graphic not allowed on Copper layers" ) );
|
||||
break;
|
||||
|
@ -267,7 +267,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
break;
|
||||
|
||||
case ID_TRACK_BUTT:
|
||||
if( !IsCopperLayer( getCurrentLayer() ) )
|
||||
if( !IsCopperLayer( getActiveLayer() ) )
|
||||
{
|
||||
DisplayError( this, _( "Tracks on Copper layers only " ) );
|
||||
break;
|
||||
|
@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
break;
|
||||
|
||||
case ID_PCB_DIMENSION_BUTT:
|
||||
if( IsCopperLayer( getCurrentLayer() ) )
|
||||
if( IsCopperLayer( getActiveLayer() ) )
|
||||
{
|
||||
DisplayError( this, _( "Dimension not allowed on Copper layers" ) );
|
||||
break;
|
||||
|
|
|
@ -730,7 +730,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor)
|
|||
bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void )
|
||||
{
|
||||
int copperlayercnt = GetBoard()->GetCopperLayerCount( );
|
||||
LAYER_NUM currLayer = getCurrentLayer();
|
||||
LAYER_NUM currLayer = getActiveLayer();
|
||||
|
||||
if( !GetDesignSettings().m_MicroViasAllowed )
|
||||
return false; // Obvious..
|
||||
|
@ -832,7 +832,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer )
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate )
|
||||
void PCB_EDIT_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate )
|
||||
{
|
||||
( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer;
|
||||
|
||||
|
@ -848,7 +848,7 @@ void PCB_EDIT_FRAME::setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate
|
|||
|
||||
void PCB_EDIT_FRAME::syncLayerWidgetLayer()
|
||||
{
|
||||
m_Layers->SelectLayer( getCurrentLayer() );
|
||||
m_Layers->SelectLayer( getActiveLayer() );
|
||||
m_Layers->OnLayerSelected();
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator()
|
|||
previous_Route_Layer_BOTTOM_color, previous_via_color;
|
||||
|
||||
/* get colors, and redraw bitmap button only on changes */
|
||||
active_layer_color = GetBoard()->GetLayerColor(getCurrentLayer());
|
||||
active_layer_color = GetBoard()->GetLayerColor(getActiveLayer());
|
||||
|
||||
if( previous_active_layer_color != active_layer_color )
|
||||
{
|
||||
|
|
|
@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
|
|||
|
||||
void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
m_SelLayerBox->SetLayerSelection( getCurrentLayer() );
|
||||
m_SelLayerBox->SetLayerSelection( getActiveLayer() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -96,16 +96,11 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent )
|
|||
|
||||
// single click? Select single object
|
||||
if( evt->IsClick( MB_Left ) )
|
||||
{
|
||||
wxLogDebug( wxT( "click ") );
|
||||
selectSingle( evt->Position() );
|
||||
}
|
||||
|
||||
// drag with LMB? Select multiple objects (or at least draw a selection box) or drag them
|
||||
if( evt->IsDrag( MB_Left ) )
|
||||
{
|
||||
wxLogDebug( wxT( "drag" ) );
|
||||
|
||||
if( m_selectedItems.empty() || m_additive )
|
||||
{
|
||||
// If nothings has been selected or user wants to select more
|
||||
|
|
|
@ -518,7 +518,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
if( !GetBoard()->m_CurrentZoneContour )
|
||||
{
|
||||
if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT &&
|
||||
getCurrentLayer() >= FIRST_NON_COPPER_LAYER )
|
||||
getActiveLayer() >= FIRST_NON_COPPER_LAYER )
|
||||
{
|
||||
DisplayError( this,
|
||||
_( "Error: a keepout area is allowed only on copper layers" ) );
|
||||
|
@ -537,7 +537,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
ZONE_EDIT_T edited;
|
||||
|
||||
// Init zone params to reasonable values
|
||||
zone->SetLayer( getCurrentLayer() );
|
||||
zone->SetLayer( getActiveLayer() );
|
||||
|
||||
// Prompt user for parameters:
|
||||
m_canvas->SetIgnoreMouseEvents( true );
|
||||
|
@ -602,7 +602,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
return 0;
|
||||
|
||||
// Switch active layer to the selected zone layer
|
||||
setCurrentLayer( zoneInfo.m_CurrentZone_Layer );
|
||||
setActiveLayer( zoneInfo.m_CurrentZone_Layer );
|
||||
|
||||
SetZoneSettings( zoneInfo );
|
||||
}
|
||||
|
@ -612,7 +612,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
// zone (add cutout or similar zone)
|
||||
|
||||
zoneInfo.m_CurrentZone_Layer = s_CurrentZone->GetLayer();
|
||||
setCurrentLayer( s_CurrentZone->GetLayer() );
|
||||
setActiveLayer( s_CurrentZone->GetLayer() );
|
||||
|
||||
zoneInfo << *s_CurrentZone;
|
||||
|
||||
|
|
Loading…
Reference in New Issue