Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. diff --git a/src/plasmaquick/appletquickitem.cpp b/src/plasmaquick/appletquickitem.cpp
  2. index c49686a4d..16b2cb3bb 100644
  3. --- a/src/plasmaquick/appletquickitem.cpp
  4. +++ b/src/plasmaquick/appletquickitem.cpp
  5. @@ -739,7 +739,9 @@ void AppletQuickItem::setSwitchWidth(int width)
  6. }
  7.  
  8. d->switchWidth = width;
  9. - d->compactRepresentationCheck();
  10. + if (d->qmlObject->mainComponent() && d->qmlObject->mainComponent()->status() == QQmlComponent::Ready) {
  11. + d->compactRepresentationCheck();
  12. + }
  13. emit switchWidthChanged(width);
  14. }
  15.  
  16. @@ -755,7 +757,9 @@ void AppletQuickItem::setSwitchHeight(int height)
  17. }
  18.  
  19. d->switchHeight = height;
  20. - d->compactRepresentationCheck();
  21. + if (d->qmlObject->mainComponent() && d->qmlObject->mainComponent()->status() == QQmlComponent::Ready) {
  22. + d->compactRepresentationCheck();
  23. + }
  24. emit switchHeightChanged(height);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement