Skip to content

Commit

Permalink
code simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
donovaly authored and WandererFan committed Jun 13, 2020
1 parent 79b267a commit 1ae69d2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Mod/TechDraw/Gui/QGIFace.cpp
Expand Up @@ -224,14 +224,14 @@ void QGIFace::loadSvgHatch(std::string fileSpec)
}
m_svgXML = f.readAll();

// search in the file for the "stroke" specifiction in order to find out what specification style is used
// search in the file for the "stroke" specifiction in order to find out what declaration style is used
// this is necessary to apply a color set by the user to the SVG
QByteArray pattern("stroke:");
QByteArrayMatcher matcher(pattern);
QByteArrayMatcher matcher(pattern);
int pos = 0;
if ((pos = matcher.indexIn(m_svgXML, pos)) != -1)
SVGCOLPREFIX = "stroke:"; // declaration part of a style= statement
else
if (matcher.indexIn(m_svgXML, pos) != -1)
SVGCOLPREFIX = "stroke:"; // declaration part of a style="" statement
else
SVGCOLPREFIX = "stroke=\""; // declaration of its own

if (!m_svg->load(&m_svgXML)) {
Expand Down

0 comments on commit 1ae69d2

Please sign in to comment.