summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-11-13 00:02:50 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2019-11-13 13:04:07 +0100
commitbeb0d74195ddc642524fe1f5a2d65d944527d1b5 (patch)
tree5180c4239ed6be5135e0eadc587400099556ec64
parent4d64f2c803b36313449a7b8a894e413c322a9b16 (diff)
downloadqtsvg-beb0d74195ddc642524fe1f5a2d65d944527d1b5.tar.gz
QSvgRenderer: Allow to remove a viewBox
m_implicitViewBox needs to be true if the explicit viewBox is null. That relationship between m_viewBox and m_implicitViewBox can be see in QSvgTinyDocument::viewBox(). Task-number: QTBUG-79933 Change-Id: I6ea5a849479b10117128bcaf1799e3770b145e77 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/svg/qsvgtinydocument.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index 7e35508..a2bf1c7 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -338,7 +338,7 @@ void QSvgTinyDocument::setHeight(int len, bool percent)
void QSvgTinyDocument::setViewBox(const QRectF &rect)
{
m_viewBox = rect;
- m_implicitViewBox = false;
+ m_implicitViewBox = rect.isNull();
}
void QSvgTinyDocument::addSvgFont(QSvgFont *font)