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
507d49b2
Commit
507d49b2
authored
Nov 12, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a minor but annoying visibility layers problem when loading a board or enabling layers
parent
e0742b62
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
dialog_layers_setup.cpp
pcbnew/dialog_layers_setup.cpp
+5
-0
files.cpp
pcbnew/files.cpp
+6
-0
pcbnew_config.cpp
pcbnew/pcbnew_config.cpp
+1
-3
No files found.
pcbnew/dialog_layers_setup.cpp
View file @
507d49b2
...
...
@@ -1001,6 +1001,11 @@ void DialogLayerSetup::OnOKClick( wxCommandEvent& event )
m_Pcb
->
m_BoardSettings
->
SetCopperLayerCount
(
NumberOfCopperLayers
);
m_Pcb
->
SetEnabledLayers
(
m_LayersMask
);
/* Reset the layers visibility flag
* Because it could creates SERIOUS mistakes for the user,
* if some layers are not visible after activating them ...
*/
m_Pcb
->
SetVisibleLayers
(
m_LayersMask
);
for
(
int
i
=
0
;
i
<
NB_COPPER_LAYERS
;
i
++
)
{
...
...
pcbnew/files.cpp
View file @
507d49b2
...
...
@@ -259,6 +259,12 @@ this file again."));
/* Rebuild the new pad list (for drc and ratsnet control ...) */
GetBoard
()
->
m_Status_Pcb
=
0
;
/* Reset the layers visibility flag when loading a new config
* Because it could creates SERIOUS mistakes for the user,
* if some layers are not visible after loading a board...
*/
GetBoard
()
->
SetVisibleLayers
(
GetBoard
()
->
GetEnabledLayers
()
);
// Display the loaded board:
DrawPanel
->
Refresh
(
true
);
wxSafeYield
();
// Needed if we want to see the board now.
...
...
pcbnew/pcbnew_config.cpp
View file @
507d49b2
...
...
@@ -177,7 +177,6 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
bool
WinEDA_PcbFrame
::
Read_Config
(
const
wxString
&
projectFileName
)
{
wxFileName
fn
=
projectFileName
;
int
ii
;
if
(
fn
.
GetExt
()
!=
ProjectFileExtension
)
fn
.
SetExt
(
ProjectFileExtension
);
...
...
@@ -197,8 +196,7 @@ bool WinEDA_PcbFrame::Read_Config( const wxString& projectFileName )
* Because it could creates SERIOUS mistakes for the user,
* if some items are not visible after loading a board...
*/
for
(
ii
=
0
;
ii
<
LAYER_COUNT
;
ii
++
)
g_DesignSettings
.
SetLayerVisibility
(
ii
,
true
);
g_DesignSettings
.
SetVisibleLayers
(
FULL_LAYERS
);
DisplayOpt
.
Show_Modules_Cmp
=
true
;
DisplayOpt
.
Show_Modules_Cu
=
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