summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/svg/qsvghandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index abd59e5..b8266f7 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -1198,12 +1198,11 @@ static void parseVisibility(QSvgNode *node,
const QSvgAttributes &attributes,
QSvgHandler *)
{
- QString value = attributes.visibility.toString();
QSvgNode *parent = node->parent();
- if (parent && (value.isEmpty() || value == QT_INHERIT))
+ if (parent && (attributes.visibility.isEmpty() || attributes.visibility == QT_INHERIT))
node->setVisible(parent->isVisible());
- else if (value == QLatin1String("hidden") || value == QLatin1String("collapse")) {
+ else if (attributes.visibility == QLatin1String("hidden") || attributes.visibility == QLatin1String("collapse")) {
node->setVisible(false);
} else
node->setVisible(true);