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
39086ffb
Commit
39086ffb
authored
Apr 03, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added loading layer visibility settings when loading a board. Minor code cleaning.
parent
4e4776c3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+11
-0
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+13
-13
No files found.
pcbnew/basepcbframe.cpp
View file @
39086ffb
...
...
@@ -226,6 +226,17 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
{
view
->
SetLayerOrder
(
m_galLayerOrder
[
i
],
i
);
}
// Load layer & elements visibility settings
for
(
unsigned
int
i
=
0
;
i
<
LAYER_COUNT
;
++
i
)
{
view
->
SetLayerVisible
(
i
,
m_Pcb
->
IsLayerVisible
(
i
)
);
}
for
(
unsigned
int
i
=
0
;
i
<
END_PCB_VISIBLE_LIST
;
++
i
)
{
view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
i
),
m_Pcb
->
IsElementVisible
(
i
)
);
}
}
#endif
}
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
39086ffb
...
...
@@ -368,16 +368,18 @@ void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal
{
KiGfx
::
VIEW
*
view
=
galCanvas
->
GetView
();
view
->
SetLayerVisible
(
aLayer
,
isVisible
);
if
(
myframe
->
IsGalCanvasActive
()
)
{
galCanvas
->
Refresh
();
}
}
#endif
/* KICAD_GAL */
if
(
isFinal
)
{
#ifdef KICAD_GAL
if
(
myframe
->
IsGalCanvasActive
()
)
galCanvas
->
Refresh
();
else
#endif
/* KICAD_GAL */
myframe
->
GetCanvas
()
->
Refresh
();
}
}
void
PCB_LAYER_WIDGET
::
OnRenderColorChange
(
int
aId
,
EDA_COLOR_T
aColor
)
...
...
@@ -418,14 +420,12 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
{
KiGfx
::
VIEW
*
view
=
galCanvas
->
GetView
();
view
->
SetLayerVisible
(
ITEM_GAL_LAYER
(
aId
),
isEnabled
);
}
if
(
myframe
->
IsGalCanvasActive
()
)
{
galCanvas
->
Refresh
();
}
}
else
#endif
/* KICAD_GAL */
myframe
->
GetCanvas
()
->
Refresh
();
}
...
...
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