diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp index ba4340412..6b0635f89 100644 --- a/src/declarativeimports/core/dialog.cpp +++ b/src/declarativeimports/core/dialog.cpp @@ -68,7 +68,6 @@ DialogProxy::DialogProxy(QQuickItem *parent) m_frameSvgItem = new Plasma::FrameSvgItem(contentItem()); m_frameSvgItem->setImagePath("dialogs/background"); //m_frameSvgItem->setImagePath("widgets/background"); // larger borders, for testing those - DialogShadows::self()->addWindow(this, m_frameSvgItem->enabledBorders()); } DialogProxy::~DialogProxy() @@ -447,7 +446,9 @@ void DialogProxy::syncBorders() borders = borders & ~Plasma::FrameSvg::BottomBorder; } m_frameSvgItem->setEnabledBorders((Plasma::FrameSvg::EnabledBorder)borders); - DialogShadows::self()->addWindow(this, m_frameSvgItem->enabledBorders()); + if (isVisible()) { + DialogShadows::self()->addWindow(this, m_frameSvgItem->enabledBorders()); + } //syncToMainItemSize(); }