Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
87c9423f
Commit
87c9423f
authored
Mar 21, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PCB_EDIT_FRAME::SetActiveLayer() & GetActiveLayer() made public.
parent
0694f2fa
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
69 additions
and
69 deletions
+69
-69
wxPcbStruct.h
include/wxPcbStruct.h
+17
-17
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+2
-2
deltrack.cpp
pcbnew/deltrack.cpp
+2
-2
dialog_general_options.cpp
pcbnew/dialogs/dialog_general_options.cpp
+1
-1
dialog_global_deletion.cpp
pcbnew/dialogs/dialog_global_deletion.cpp
+1
-1
dialog_layers_setup.cpp
pcbnew/dialogs/dialog_layers_setup.cpp
+5
-5
dimension.cpp
pcbnew/dimension.cpp
+1
-1
edit.cpp
pcbnew/edit.cpp
+14
-14
editedge.cpp
pcbnew/editedge.cpp
+2
-2
editrack-part2.cpp
pcbnew/editrack-part2.cpp
+6
-6
hotkeys_board_editor.cpp
pcbnew/hotkeys_board_editor.cpp
+5
-5
onleftclick.cpp
pcbnew/onleftclick.cpp
+4
-4
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-3
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+1
-1
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+1
-1
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+4
-4
No files found.
include/wxPcbStruct.h
View file @
87c9423f
...
...
@@ -134,22 +134,6 @@ protected:
void
createPopUpBlockMenu
(
wxMenu
*
menu
);
void
createPopUpMenuForMarkers
(
MARKER_PCB
*
aMarker
,
wxMenu
*
aPopMenu
);
/**
* Function setActiveLayer
* will change the currently active layer to \a aLayer and also
* update the PCB_LAYER_WIDGET.
*/
void
setActiveLayer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
=
true
);
/**
* Function getActiveLayer
* returns the active layer
*/
LAYER_NUM
getActiveLayer
()
{
return
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
}
/**
* Function setHighContrastLayer
* takes care of display settings for the given layer to be displayed in high contrast mode.
...
...
@@ -159,7 +143,7 @@ protected:
/**
* Function syncLayerWidgetLayer
* updates the currently layer "selection" within the PCB_LAYER_WIDGET.
* The currently selected layer is defined by the return value of
g
etActiveLayer().
* The currently selected layer is defined by the return value of
G
etActiveLayer().
* <p>
* This function cannot be inline without including layer_widget.h in
* here and we do not want to do that.
...
...
@@ -577,6 +561,22 @@ public:
*/
void
SetTopLayer
(
LAYER_NUM
aLayer
);
/**
* Function SetActiveLayer
* will change the currently active layer to \a aLayer and also
* update the PCB_LAYER_WIDGET.
*/
void
SetActiveLayer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
=
true
);
/**
* Function GetActiveLayer
* returns the active layer
*/
LAYER_NUM
GetActiveLayer
()
{
return
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
}
/**
* Function IsElementVisible
* tests whether a given element category is visible. Keep this as an
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
87c9423f
...
...
@@ -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
->
g
etActiveLayer
()
)
)
if
(
force_active_layer_visible
&&
(
layer
==
myframe
->
G
etActiveLayer
()
)
)
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
->
s
etActiveLayer
(
aLayer
,
false
);
myframe
->
S
etActiveLayer
(
aLayer
,
false
);
if
(
m_alwaysShowActiveCopperLayer
)
OnLayerSelected
();
...
...
pcbnew/deltrack.cpp
View file @
87c9423f
...
...
@@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
{
if
(
g_CurrentTrackList
.
GetCount
()
>
0
)
{
LAYER_NUM
previous_layer
=
g
etActiveLayer
();
LAYER_NUM
previous_layer
=
G
etActiveLayer
();
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
s
etActiveLayer
(
previous_layer
);
S
etActiveLayer
(
previous_layer
);
UpdateStatusBar
();
...
...
pcbnew/dialogs/dialog_general_options.cpp
View file @
87c9423f
...
...
@@ -228,7 +228,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
(
g
etActiveLayer
()
);
setHighContrastLayer
(
G
etActiveLayer
()
);
m_canvas
->
Refresh
();
break
;
...
...
pcbnew/dialogs/dialog_global_deletion.cpp
View file @
87c9423f
...
...
@@ -39,7 +39,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
(
g
etActiveLayer
()
);
dlg
.
SetCurrentLayer
(
G
etActiveLayer
()
);
dlg
.
ShowModal
();
}
...
...
pcbnew/dialogs/dialog_layers_setup.cpp
View file @
87c9423f
...
...
@@ -670,11 +670,11 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
return
;
wxLogDebug
(
wxT
(
"Current layer selected %d."
),
g
etActiveLayer
()
);
wxLogDebug
(
wxT
(
"Current layer selected %d."
),
G
etActiveLayer
()
);
// If the current active layer was removed, find the next avaiable layer to set as the
// active layer.
if
(
!
(
GetLayerMask
(
g
etActiveLayer
()
)
&
GetBoard
()
->
GetEnabledLayers
()
)
)
if
(
!
(
GetLayerMask
(
G
etActiveLayer
()
)
&
GetBoard
()
->
GetEnabledLayers
()
)
)
{
for
(
LAYER_NUM
i
=
FIRST_LAYER
;
i
<
NB_LAYERS
;
++
i
)
{
...
...
@@ -685,14 +685,14 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup()
if
(
GetLayerMask
(
tmp
)
&
GetBoard
()
->
GetEnabledLayers
()
)
{
wxLogDebug
(
wxT
(
"Setting current layer to %d."
),
g
etActiveLayer
()
);
s
etActiveLayer
(
tmp
,
true
);
wxLogDebug
(
wxT
(
"Setting current layer to %d."
),
G
etActiveLayer
()
);
S
etActiveLayer
(
tmp
,
true
);
break
;
}
}
}
else
{
setActiveLayer
(
g
etActiveLayer
(),
true
);
SetActiveLayer
(
G
etActiveLayer
(),
true
);
}
}
pcbnew/dimension.cpp
View file @
87c9423f
...
...
@@ -251,7 +251,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC )
aDimension
=
new
DIMENSION
(
GetBoard
()
);
aDimension
->
SetFlags
(
IS_NEW
);
aDimension
->
SetLayer
(
g
etActiveLayer
()
);
aDimension
->
SetLayer
(
G
etActiveLayer
()
);
aDimension
->
SetOrigin
(
pos
);
aDimension
->
SetEnd
(
pos
);
...
...
pcbnew/edit.cpp
View file @
87c9423f
...
...
@@ -406,14 +406,14 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
m_canvas
->
SetIgnoreMouseEvents
(
true
);
wxPoint
dlgPosition
;
wxGetMousePosition
(
&
dlgPosition
.
x
,
&
dlgPosition
.
y
);
LAYER_NUM
layer
=
SelectLayer
(
g
etActiveLayer
(),
ALL_NO_CU_LAYERS
,
LAYER_NUM
layer
=
SelectLayer
(
G
etActiveLayer
(),
ALL_NO_CU_LAYERS
,
dlgPosition
);
m_canvas
->
SetIgnoreMouseEvents
(
false
);
m_canvas
->
MoveCursorToCrossHair
();
if
(
g
etActiveLayer
()
!=
layer
)
if
(
G
etActiveLayer
()
!=
layer
)
{
GetScreen
()
->
m_Route_Layer_TOP
=
g
etActiveLayer
();
GetScreen
()
->
m_Route_Layer_TOP
=
G
etActiveLayer
();
GetScreen
()
->
m_Route_Layer_BOTTOM
=
layer
;
Other_Layer_Route
(
(
TRACK
*
)
GetCurItem
(),
&
dc
);
}
...
...
@@ -942,17 +942,17 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_PCB_SELECT_LAYER
:
itmp
=
SelectLayer
(
g
etActiveLayer
()
);
itmp
=
SelectLayer
(
G
etActiveLayer
()
);
if
(
itmp
>=
0
)
{
// if user changed colors and we are in high contrast mode, then redraw
// because the PAD_SMD pads may change color.
if
(
DisplayOpt
.
ContrastModeDisplay
&&
g
etActiveLayer
()
!=
itmp
)
if
(
DisplayOpt
.
ContrastModeDisplay
&&
G
etActiveLayer
()
!=
itmp
)
{
m_canvas
->
Refresh
();
}
s
etActiveLayer
(
itmp
);
S
etActiveLayer
(
itmp
);
}
m_canvas
->
MoveCursorToCrossHair
();
...
...
@@ -963,19 +963,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_PCB_SELECT_NO_CU_LAYER
:
itmp
=
SelectLayer
(
g
etActiveLayer
(),
ALL_CU_LAYERS
);
itmp
=
SelectLayer
(
G
etActiveLayer
(),
ALL_CU_LAYERS
);
if
(
itmp
>=
0
)
s
etActiveLayer
(
itmp
);
S
etActiveLayer
(
itmp
);
m_canvas
->
MoveCursorToCrossHair
();
break
;
case
ID_POPUP_PCB_SELECT_CU_LAYER
:
itmp
=
SelectLayer
(
g
etActiveLayer
(),
ALL_NO_CU_LAYERS
);
itmp
=
SelectLayer
(
G
etActiveLayer
(),
ALL_NO_CU_LAYERS
);
if
(
itmp
>=
0
)
s
etActiveLayer
(
itmp
);
S
etActiveLayer
(
itmp
);
break
;
...
...
@@ -985,7 +985,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_TOOLBARH_PCB_SELECT_LAYER
:
s
etActiveLayer
(
m_SelLayerBox
->
GetLayerSelection
()
);
S
etActiveLayer
(
m_SelLayerBox
->
GetLayerSelection
()
);
if
(
DisplayOpt
.
ContrastModeDisplay
)
m_canvas
->
Refresh
(
true
);
...
...
@@ -1288,7 +1288,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
void
PCB_EDIT_FRAME
::
SwitchLayer
(
wxDC
*
DC
,
LAYER_NUM
layer
)
{
LAYER_NUM
curLayer
=
g
etActiveLayer
();
LAYER_NUM
curLayer
=
G
etActiveLayer
();
// Check if the specified layer matches the present layer
if
(
layer
==
curLayer
)
...
...
@@ -1330,7 +1330,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
GetScreen
()
->
m_Route_Layer_TOP
=
curLayer
;
GetScreen
()
->
m_Route_Layer_BOTTOM
=
layer
;
s
etActiveLayer
(
curLayer
);
S
etActiveLayer
(
curLayer
);
if
(
Other_Layer_Route
(
(
TRACK
*
)
GetScreen
()
->
GetCurItem
(),
DC
)
)
{
...
...
@@ -1351,7 +1351,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
// and a non-copper layer, or vice-versa?
// ...
s
etActiveLayer
(
layer
);
S
etActiveLayer
(
layer
);
if
(
DisplayOpt
.
ContrastModeDisplay
)
m_canvas
->
Refresh
();
...
...
pcbnew/editedge.cpp
View file @
87c9423f
...
...
@@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s
s_large
=
GetDesignSettings
().
m_DrawSegmentWidth
;
if
(
g
etActiveLayer
()
==
EDGE_N
)
if
(
G
etActiveLayer
()
==
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
(
g
etActiveLayer
()
);
Segment
->
SetLayer
(
G
etActiveLayer
()
);
Segment
->
SetWidth
(
s_large
);
Segment
->
SetShape
(
shape
);
Segment
->
SetAngle
(
900
);
...
...
pcbnew/editrack-part2.cpp
View file @
87c9423f
...
...
@@ -51,10 +51,10 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
if
(
aTrack
==
NULL
)
{
if
(
g
etActiveLayer
()
!=
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
)
s
etActiveLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
);
if
(
G
etActiveLayer
()
!=
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
)
S
etActiveLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_TOP
);
else
s
etActiveLayer
(((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_BOTTOM
);
S
etActiveLayer
(((
PCB_SCREEN
*
)
GetScreen
())
->
m_Route_Layer_BOTTOM
);
UpdateStatusBar
();
return
true
;
...
...
@@ -108,7 +108,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
=
g
etActiveLayer
();
LAYER_NUM
first_layer
=
G
etActiveLayer
();
LAYER_NUM
last_layer
;
// prepare switch to new active layer:
...
...
@@ -171,7 +171,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
return
false
;
}
s
etActiveLayer
(
last_layer
);
S
etActiveLayer
(
last_layer
);
TRACK
*
lastNonVia
=
g_CurrentTrackSegment
;
...
...
@@ -193,7 +193,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC )
*/
// set the layer to the new value
track
->
SetLayer
(
g
etActiveLayer
()
);
track
->
SetLayer
(
G
etActiveLayer
()
);
/* 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)
...
...
pcbnew/hotkeys_board_editor.cpp
View file @
87c9423f
...
...
@@ -263,7 +263,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
break
;
case
HK_SWITCH_LAYER_TO_PREVIOUS
:
ll
=
g
etActiveLayer
();
ll
=
G
etActiveLayer
();
if
(
(
ll
<=
LAYER_N_BACK
)
||
(
ll
>
LAYER_N_FRONT
)
)
break
;
...
...
@@ -279,7 +279,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
break
;
case
HK_SWITCH_LAYER_TO_NEXT
:
ll
=
g
etActiveLayer
();
ll
=
G
etActiveLayer
();
if
(
(
ll
<
LAYER_N_BACK
)
||
(
ll
>=
LAYER_N_FRONT
)
)
break
;
...
...
@@ -397,7 +397,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
break
;
case
HK_BACK_SPACE
:
if
(
IsCopperLayer
(
g
etActiveLayer
()
)
)
if
(
IsCopperLayer
(
G
etActiveLayer
()
)
)
{
if
(
!
itemCurrentlyEdited
)
{
...
...
@@ -622,7 +622,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC )
switch
(
GetToolId
()
)
{
case
ID_TRACK_BUTT
:
if
(
g
etActiveLayer
()
>
LAYER_N_FRONT
)
if
(
G
etActiveLayer
()
>
LAYER_N_FRONT
)
return
false
;
if
(
ItemFree
)
...
...
@@ -983,7 +983,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC )
TRACK
*
PCB_EDIT_FRAME
::
OnHotkeyBeginRoute
(
wxDC
*
aDC
)
{
if
(
g
etActiveLayer
()
>
LAYER_N_FRONT
)
if
(
G
etActiveLayer
()
>
LAYER_N_FRONT
)
return
NULL
;
bool
itemCurrentlyEdited
=
(
GetCurItem
()
&&
GetCurItem
()
->
GetFlags
());
...
...
pcbnew/onleftclick.cpp
View file @
87c9423f
...
...
@@ -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
(
g
etActiveLayer
()
)
)
if
(
IsCopperLayer
(
G
etActiveLayer
()
)
)
{
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
(
g
etActiveLayer
()
)
)
if
(
!
IsCopperLayer
(
G
etActiveLayer
()
)
)
{
DisplayError
(
this
,
_
(
"Tracks on Copper layers only "
)
);
break
;
...
...
@@ -325,7 +325,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
break
;
case
ID_PCB_ADD_TEXT_BUTT
:
if
(
IsLayerInList
(
EDGE_LAYER
,
g
etActiveLayer
()
)
)
if
(
IsLayerInList
(
EDGE_LAYER
,
G
etActiveLayer
()
)
)
{
DisplayError
(
this
,
_
(
"Texts not allowed on Edge Cut layer"
)
);
...
...
@@ -374,7 +374,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
break
;
case
ID_PCB_DIMENSION_BUTT
:
if
(
IsLayerInList
(
EDGE_LAYER
|
ALL_CU_LAYERS
,
g
etActiveLayer
()
)
)
if
(
IsLayerInList
(
EDGE_LAYER
|
ALL_CU_LAYERS
,
G
etActiveLayer
()
)
)
{
DisplayError
(
this
,
_
(
"Dimension not allowed on Copper or Edge Cut layers"
)
);
...
...
pcbnew/pcbframe.cpp
View file @
87c9423f
...
...
@@ -842,7 +842,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor)
bool
PCB_EDIT_FRAME
::
IsMicroViaAcceptable
(
void
)
{
int
copperlayercnt
=
GetBoard
()
->
GetCopperLayerCount
(
);
LAYER_NUM
currLayer
=
g
etActiveLayer
();
LAYER_NUM
currLayer
=
G
etActiveLayer
();
if
(
!
GetDesignSettings
().
m_MicroViasAllowed
)
return
false
;
// Obvious..
...
...
@@ -946,7 +946,7 @@ void PCB_EDIT_FRAME::SetTopLayer( LAYER_NUM aLayer )
}
void
PCB_EDIT_FRAME
::
s
etActiveLayer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
)
void
PCB_EDIT_FRAME
::
S
etActiveLayer
(
LAYER_NUM
aLayer
,
bool
doLayerWidgetUpdate
)
{
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
=
aLayer
;
...
...
@@ -962,7 +962,7 @@ void PCB_EDIT_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate
void
PCB_EDIT_FRAME
::
syncLayerWidgetLayer
()
{
m_Layers
->
SelectLayer
(
g
etActiveLayer
()
);
m_Layers
->
SelectLayer
(
G
etActiveLayer
()
);
m_Layers
->
OnLayerSelected
();
}
...
...
pcbnew/tool_pcb.cpp
View file @
87c9423f
...
...
@@ -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
(
g
etActiveLayer
());
active_layer_color
=
GetBoard
()
->
GetLayerColor
(
G
etActiveLayer
());
if
(
previous_active_layer_color
!=
active_layer_color
)
{
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
87c9423f
...
...
@@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
void
PCB_EDIT_FRAME
::
OnUpdateLayerSelectBox
(
wxUpdateUIEvent
&
aEvent
)
{
m_SelLayerBox
->
SetLayerSelection
(
g
etActiveLayer
()
);
m_SelLayerBox
->
SetLayerSelection
(
G
etActiveLayer
()
);
}
...
...
pcbnew/zones_by_polygon.cpp
View file @
87c9423f
...
...
@@ -515,7 +515,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
if
(
!
GetBoard
()
->
m_CurrentZoneContour
)
{
if
(
GetToolId
()
==
ID_PCB_KEEPOUT_AREA_BUTT
&&
g
etActiveLayer
()
>=
FIRST_NON_COPPER_LAYER
)
G
etActiveLayer
()
>=
FIRST_NON_COPPER_LAYER
)
{
DisplayError
(
this
,
_
(
"Error: a keepout area is allowed only on copper layers"
)
);
...
...
@@ -534,7 +534,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
ZONE_EDIT_T
edited
;
// Init zone params to reasonable values
zone
->
SetLayer
(
g
etActiveLayer
()
);
zone
->
SetLayer
(
G
etActiveLayer
()
);
// Prompt user for parameters:
m_canvas
->
SetIgnoreMouseEvents
(
true
);
...
...
@@ -597,7 +597,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
return
0
;
// Switch active layer to the selected zone layer
s
etActiveLayer
(
zoneInfo
.
m_CurrentZone_Layer
);
S
etActiveLayer
(
zoneInfo
.
m_CurrentZone_Layer
);
SetZoneSettings
(
zoneInfo
);
}
...
...
@@ -607,7 +607,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
// zone (add cutout or similar zone)
zoneInfo
.
m_CurrentZone_Layer
=
s_CurrentZone
->
GetLayer
();
s
etActiveLayer
(
s_CurrentZone
->
GetLayer
()
);
S
etActiveLayer
(
s_CurrentZone
->
GetLayer
()
);
zoneInfo
<<
*
s_CurrentZone
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment