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
0306ec7e
Commit
0306ec7e
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{Set,Get}ActiveLayer moved from PCB_EDIT_FRAME to PCB_BASE_FRAME.
parent
5a428e19
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
22 deletions
+29
-22
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+18
-0
wxPcbStruct.h
include/wxPcbStruct.h
+1
-10
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+1
-1
module_editor_frame.h
pcbnew/module_editor_frame.h
+0
-1
pcb_draw_panel_gal.cpp
pcbnew/pcb_draw_panel_gal.cpp
+3
-3
pcbframe.cpp
pcbnew/pcbframe.cpp
+3
-4
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+1
-1
pcbnew_control.cpp
pcbnew/tools/pcbnew_control.cpp
+2
-2
No files found.
include/wxBasePcbFrame.h
View file @
0306ec7e
...
...
@@ -613,6 +613,24 @@ public:
virtual
void
SwitchLayer
(
wxDC
*
DC
,
LAYER_ID
layer
);
/**
* Function SetActiveLayer
* will change the currently active layer to \a aLayer.
*/
virtual
void
SetActiveLayer
(
LAYER_ID
aLayer
)
{
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
=
aLayer
;
}
/**
* Function GetActiveLayer
* returns the active layer
*/
virtual
LAYER_ID
GetActiveLayer
()
const
{
return
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
}
void
LoadSettings
(
wxConfigBase
*
aCfg
);
// override virtual
void
SaveSettings
(
wxConfigBase
*
aCfg
);
// override virtual
...
...
include/wxPcbStruct.h
View file @
0306ec7e
...
...
@@ -536,16 +536,7 @@ public:
* will change the currently active layer to \a aLayer and also
* update the PCB_LAYER_WIDGET.
*/
void
SetActiveLayer
(
LAYER_ID
aLayer
,
bool
doLayerWidgetUpdate
=
true
);
/**
* Function GetActiveLayer
* returns the active layer
*/
LAYER_ID
GetActiveLayer
()
const
{
return
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
}
virtual
void
SetActiveLayer
(
LAYER_ID
aLayer
);
/**
* Function IsElementVisible
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
0306ec7e
...
...
@@ -373,7 +373,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer )
{
// the layer change from the PCB_LAYER_WIDGET can be denied by returning
// false from this function.
myframe
->
SetActiveLayer
(
ToLAYER_ID
(
aLayer
)
,
false
);
myframe
->
SetActiveLayer
(
ToLAYER_ID
(
aLayer
)
);
if
(
m_alwaysShowActiveCopperLayer
)
OnLayerSelected
();
...
...
pcbnew/module_editor_frame.h
View file @
0306ec7e
...
...
@@ -217,7 +217,6 @@ public:
BOARD_ITEM
*
ModeditLocateAndDisplay
(
int
aHotKeyCode
=
0
);
/* Undo and redo functions */
public
:
/**
* Function SaveCopyInUndoList.
...
...
pcbnew/pcb_draw_panel_gal.cpp
View file @
0306ec7e
...
...
@@ -326,13 +326,13 @@ void PCB_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer )
void
PCB_DRAW_PANEL_GAL
::
SyncLayersVisibility
(
const
BOARD
*
aBoard
)
{
// Load layer & elements visibility settings
for
(
LAYER_NUM
i
=
0
;
i
<
NB_LAYERS
;
++
i
)
for
(
LAYER_NUM
i
=
0
;
i
<
LAYER_ID_COUNT
;
++
i
)
{
m_view
->
SetLayerVisible
(
i
,
aBoard
->
IsLayerVisible
(
i
)
);
m_view
->
SetLayerVisible
(
i
,
aBoard
->
IsLayerVisible
(
LAYER_ID
(
i
)
)
);
// Synchronize netname layers as well
if
(
IsCopperLayer
(
i
)
)
m_view
->
SetLayerVisible
(
GetNetnameLayer
(
i
),
aBoard
->
IsLayerVisible
(
i
)
);
m_view
->
SetLayerVisible
(
GetNetnameLayer
(
i
),
aBoard
->
IsLayerVisible
(
LAYER_ID
(
i
)
)
);
}
for
(
LAYER_NUM
i
=
0
;
i
<
END_PCB_VISIBLE_LIST
;
++
i
)
...
...
pcbnew/pcbframe.cpp
View file @
0306ec7e
...
...
@@ -783,13 +783,12 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable()
}
void
PCB_EDIT_FRAME
::
SetActiveLayer
(
LAYER_ID
aLayer
,
bool
doLayerWidgetUpdate
)
void
PCB_EDIT_FRAME
::
SetActiveLayer
(
LAYER_ID
aLayer
)
{
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
=
aLayer
;
PCB_BASE_FRAME
::
SetActiveLayer
(
aLayer
)
;
GetGalCanvas
()
->
SetHighContrastLayer
(
aLayer
);
if
(
doLayerWidgetUpdate
)
syncLayerWidgetLayer
();
if
(
IsGalCanvasActive
()
)
...
...
pcbnew/pcbnew_config.cpp
View file @
0306ec7e
...
...
@@ -99,7 +99,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
if
(
!
GetBoard
()
->
GetEnabledLayers
()[
cur_layer
]
)
cur_layer
=
F_Cu
;
SetActiveLayer
(
cur_layer
,
true
);
SetActiveLayer
(
cur_layer
);
OnModify
();
ReCreateLayerBox
();
...
...
pcbnew/tools/pcbnew_control.cpp
View file @
0306ec7e
...
...
@@ -289,7 +289,7 @@ int PCBNEW_CONTROL::LayerInner6( TOOL_EVENT& aEvent )
int
PCBNEW_CONTROL
::
LayerBottom
(
TOOL_EVENT
&
aEvent
)
{
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
S
etActiveLayer
(
B_Cu
,
true
);
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
S
witchLayer
(
NULL
,
B_Cu
);
getEditFrame
<
PCB_EDIT_FRAME
>
()
->
GetGalCanvas
()
->
SetFocus
();
setTransitions
();
...
...
@@ -311,7 +311,7 @@ int PCBNEW_CONTROL::LayerNext( TOOL_EVENT& aEvent )
if
(
getModel
<
BOARD
>
()
->
GetCopperLayerCount
()
<
2
)
// Single layer
layer
=
B_Cu
;
else
if
(
layer
>=
getModel
<
BOARD
>
()
->
GetCopperLayerCount
()
-
2
)
layer
=
B
_Cu
;
layer
=
F
_Cu
;
else
++
layer
;
...
...
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