Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
d9e96ccf
Commit
d9e96ccf
authored
Sep 15, 2014
by
Ritch Melton
Browse files
Precondition test simplification
parent
b2f12f81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Text/SvgTextBase.cs
View file @
d9e96ccf
...
...
@@ -337,7 +337,7 @@ namespace Svg
{
// Make sure the path is always null if there is no text
//if there is a TSpan inside of this text element then path should not be null (even if this text is empty!)
if
((
string
.
IsNullOrEmpty
(
Text
.
Trim
())
)
&&
!
Children
.
Any
(
x
=>
x
is
SvgTextSpan
))
if
((
string
.
IsNullOrEmpty
(
Text
)
||
Text
.
Trim
().
Length
<
1
)
&&
!
Children
.
Any
(
x
=>
x
is
SvgTextSpan
))
return
_path
=
null
;
//NOT SURE WHAT THIS IS ABOUT - Path gets created again anyway - WTF?
// When an empty string is passed to GraphicsPath, it rises an InvalidArgumentException...
...
...
Write
Preview
Supports
Markdown
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