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
e5b9706f
Commit
e5b9706f
authored
Feb 12, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trap bad text layer numbers with DisplayError
parent
3fa93818
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
7 deletions
+42
-7
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+42
-7
No files found.
pcbnew/plot_rtn.cpp
View file @
e5b9706f
...
@@ -217,9 +217,18 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -217,9 +217,18 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
trace_ref
=
Sel_Texte_Reference
;
// les 2 autorisations de tracer sont donnees
trace_ref
=
Sel_Texte_Reference
;
// les 2 autorisations de tracer sont donnees
TEXTE_MODULE
*
text
=
Module
->
m_Reference
;
TEXTE_MODULE
*
text
=
Module
->
m_Reference
;
int
textLayer
=
text
->
GetLayer
();
unsigned
textLayer
=
text
->
GetLayer
();
wxASSERT
(
(
unsigned
)
textLayer
<
32
);
if
(
textLayer
>=
32
)
{
wxString
errMsg
;
errMsg
.
Printf
(
_
(
"Your BOARD has a bad layer number of %u for module
\n
%s's
\"
reference
\"
text."
),
textLayer
,
Module
->
GetReference
().
GetData
()
);
DisplayError
(
this
,
errMsg
);
goto
exit
;
}
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
trace_ref
=
FALSE
;
trace_ref
=
FALSE
;
...
@@ -230,7 +239,16 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -230,7 +239,16 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
text
=
Module
->
m_Value
;
text
=
Module
->
m_Value
;
textLayer
=
text
->
GetLayer
();
textLayer
=
text
->
GetLayer
();
wxASSERT
(
(
unsigned
)
textLayer
<
32
);
if
(
textLayer
>
32
)
{
wxString
errMsg
;
errMsg
.
Printf
(
_
(
"Your BOARD has a bad layer number of %u for module
\n
%s's
\"
value
\"
text."
),
textLayer
,
Module
->
GetReference
().
GetData
()
);
DisplayError
(
this
,
errMsg
);
goto
exit
;
}
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
if
(
(
(
1
<<
textLayer
)
&
masque_layer
)
==
0
)
trace_val
=
FALSE
;
trace_val
=
FALSE
;
...
@@ -265,14 +283,31 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -265,14 +283,31 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
continue
;
continue
;
if
(
(
pt_texte
->
m_NoShow
)
&&
!
Sel_Texte_Invisible
)
if
(
(
pt_texte
->
m_NoShow
)
&&
!
Sel_Texte_Invisible
)
continue
;
continue
;
if
(
(
g_TabOneLayerMask
[
pt_texte
->
GetLayer
()]
&
masque_layer
)
==
0
)
textLayer
=
pt_texte
->
GetLayer
();
if
(
textLayer
>=
32
)
{
wxString
errMsg
;
errMsg
.
Printf
(
_
(
"Your BOARD has a bad layer number of %u for module
\n
%s's
\"
module text
\"
text of %s."
),
textLayer
,
Module
->
GetReference
().
GetData
(),
pt_texte
->
m_Text
.
GetData
()
);
DisplayError
(
this
,
errMsg
);
goto
exit
;
}
if
(
!
(
(
1
<<
textLayer
)
&
masque_layer
)
)
continue
;
continue
;
PlotTextModule
(
pt_texte
);
PlotTextModule
(
pt_texte
);
nb_items
++
;
nb_items
++
;
msg
.
Printf
(
wxT
(
"%d"
),
nb_items
);
msg
.
Printf
(
wxT
(
"%d"
),
nb_items
);
Affiche_1_Parametre
(
this
,
64
,
wxEmptyString
,
msg
,
LIGHTBLUE
);
Affiche_1_Parametre
(
this
,
64
,
wxEmptyString
,
msg
,
LIGHTBLUE
);
}
}
}
}
exit
:
;
}
}
...
@@ -590,10 +625,10 @@ void Plot_1_texte( int format_plot, const wxString& Text, int angle,
...
@@ -590,10 +625,10 @@ void Plot_1_texte( int format_plot, const wxString& Text, int angle,
ptcar
=
graphic_fonte_shape
[
code
];
/* ptcar pointe la description
ptcar
=
graphic_fonte_shape
[
code
];
/* ptcar pointe la description
* du caractere a dessiner */
* du caractere a dessiner */
plume
=
'U'
;
plume
=
'U'
;
ox
=
sx
;
ox
=
sx
;
oy
=
sy
;
oy
=
sy
;
RotatePoint
(
&
ox
,
&
oy
,
cX
,
cY
,
angle
);
RotatePoint
(
&
ox
,
&
oy
,
cX
,
cY
,
angle
);
fx
=
ox
;
fy
=
oy
;
fx
=
ox
;
fy
=
oy
;
...
...
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