Add a check for whether the item isn't actually visible
Add a check for whether the item isn't actually visible

Summary:
if width or height is 0 we just get warnings such as:
QImage::scaled: Image is a null image

And in the end we're performing void operations that we could skip
altohether.

Test Plan: Now I can run KAlgebra without the warning

Reviewers: #kirigami, mart

Reviewed By: #kirigami, mart

Subscribers: plasma-devel

Tags: #kirigami

Differential Revision: https://phabricator.kde.org/D6343

bearsh/kirigami,bearsh/kirigami