diff --git a/src/widget/paintable.cpp b/src/widget/paintable.cpp index 7bff65dea63..781c7e8f512 100644 --- a/src/widget/paintable.cpp +++ b/src/widget/paintable.cpp @@ -50,8 +50,7 @@ QString Paintable::DrawModeToString(DrawMode mode) { } Paintable::Paintable(const PixmapSource& source, DrawMode mode, double scaleFactor) - : m_drawMode(mode), - m_source(source) { + : m_drawMode(mode) { if (!source.isSVG()) { m_pPixmap.reset(WPixmapStore::getPixmapNoCache(source.getPath(), scaleFactor)); } else { @@ -97,7 +96,7 @@ Paintable::Paintable(const PixmapSource& source, DrawMode mode, double scaleFact } bool Paintable::isNull() const { - return m_source.isEmpty(); + return !(m_pPixmap || m_pSvg); } QSize Paintable::size() const { diff --git a/src/widget/paintable.h b/src/widget/paintable.h index 8ffda3017d2..0e61390cd9e 100644 --- a/src/widget/paintable.h +++ b/src/widget/paintable.h @@ -57,5 +57,4 @@ class Paintable { std::unique_ptr m_pPixmap; std::unique_ptr m_pSvg; DrawMode m_drawMode; - PixmapSource m_source; };