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
5a428e19
Commit
5a428e19
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved layers visibility synchronization to PCB_DRAW_PANEL_GAL::SyncLayersVisibility().
parent
a24576f3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
23 deletions
+33
-23
pcb_draw_panel_gal.cpp
pcbnew/pcb_draw_panel_gal.cpp
+25
-0
pcb_draw_panel_gal.h
pcbnew/pcb_draw_panel_gal.h
+7
-0
pcbframe.cpp
pcbnew/pcbframe.cpp
+1
-23
No files found.
pcbnew/pcb_draw_panel_gal.cpp
View file @
5a428e19
...
@@ -321,3 +321,28 @@ void PCB_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer )
...
@@ -321,3 +321,28 @@ void PCB_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer )
m_view
->
UpdateAllLayersOrder
();
m_view
->
UpdateAllLayersOrder
();
}
}
void
PCB_DRAW_PANEL_GAL
::
SyncLayersVisibility
(
const
BOARD
*
aBoard
)
{
// Load layer & elements visibility settings
for
(
LAYER_NUM
i
=
0
;
i
<
NB_LAYERS
;
++
i
)
{
m_view
->
SetLayerVisible
(
i
,
aBoard
->
IsLayerVisible
(
i
)
);
// Synchronize netname layers as well
if
(
IsCopperLayer
(
i
)
)
m_view
->
SetLayerVisible
(
GetNetnameLayer
(
i
),
aBoard
->
IsLayerVisible
(
i
)
);
}
for
(
LAYER_NUM
i
=
0
;
i
<
END_PCB_VISIBLE_LIST
;
++
i
)
{
m_view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
i
),
aBoard
->
IsElementVisible
(
i
)
);
}
// Enable some layers that are GAL specific
m_view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
PADS_HOLES_VISIBLE
),
true
);
m_view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
VIAS_HOLES_VISIBLE
),
true
);
m_view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
WORKSHEET
),
true
);
m_view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
GP_OVERLAY
),
true
);
}
pcbnew/pcb_draw_panel_gal.h
View file @
5a428e19
...
@@ -70,6 +70,13 @@ public:
...
@@ -70,6 +70,13 @@ public:
///> @copydoc EDA_DRAW_PANEL_GAL::SetTopLayer()
///> @copydoc EDA_DRAW_PANEL_GAL::SetTopLayer()
virtual
void
SetTopLayer
(
LAYER_ID
aLayer
);
virtual
void
SetTopLayer
(
LAYER_ID
aLayer
);
/**
* Function SyncLayersVisibility
* Updates "visibility" property of each layer of a given BOARD.
* @param aBoard contains layers visibility settings to be applied.
*/
void
SyncLayersVisibility
(
const
BOARD
*
aBoard
);
protected
:
protected
:
///> Currently used worksheet
///> Currently used worksheet
KIGFX
::
WORKSHEET_VIEWITEM
*
m_worksheet
;
KIGFX
::
WORKSHEET_VIEWITEM
*
m_worksheet
;
...
...
pcbnew/pcbframe.cpp
View file @
5a428e19
...
@@ -813,29 +813,7 @@ void PCB_EDIT_FRAME::syncRenderStates()
...
@@ -813,29 +813,7 @@ void PCB_EDIT_FRAME::syncRenderStates()
void
PCB_EDIT_FRAME
::
syncLayerVisibilities
()
void
PCB_EDIT_FRAME
::
syncLayerVisibilities
()
{
{
m_Layers
->
SyncLayerVisibilities
();
m_Layers
->
SyncLayerVisibilities
();
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
)
->
SyncLayersVisibility
(
m_Pcb
);
KIGFX
::
VIEW
*
view
=
GetGalCanvas
()
->
GetView
();
// Load layer & elements visibility settings
for
(
LAYER_NUM
i
=
0
;
i
<
LAYER_ID_COUNT
;
++
i
)
{
view
->
SetLayerVisible
(
i
,
m_Pcb
->
IsLayerVisible
(
LAYER_ID
(
i
)
)
);
// Synchronize netname layers as well
if
(
IsCopperLayer
(
i
)
)
view
->
SetLayerVisible
(
GetNetnameLayer
(
i
),
m_Pcb
->
IsLayerVisible
(
LAYER_ID
(
i
)
)
);
}
for
(
LAYER_NUM
i
=
0
;
i
<
END_PCB_VISIBLE_LIST
;
++
i
)
{
view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
i
),
m_Pcb
->
IsElementVisible
(
i
)
);
}
// Enable some layers that are GAL specific
view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
PADS_HOLES_VISIBLE
),
true
);
view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
VIAS_HOLES_VISIBLE
),
true
);
view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
WORKSHEET
),
true
);
view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
GP_OVERLAY
),
true
);
}
}
...
...
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