Commit be44f67e authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix KisSelectionMask not to cause any updates when cloning

CCBUG:412747
parent 434c8582
......@@ -57,6 +57,7 @@ public:
KoColor maskColor;
void slotSelectionChangedCompressed();
void slotConfigChangedImpl(bool blockUpdates);
void slotConfigChanged();
};
......@@ -77,7 +78,7 @@ KisSelectionMask::KisSelectionMask(KisImageWSP image)
this->moveToThread(image->thread());
connect(KisImageConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged()));
m_d->slotConfigChanged();
m_d->slotConfigChangedImpl(false);
}
KisSelectionMask::KisSelectionMask(const KisSelectionMask& rhs)
......@@ -92,7 +93,7 @@ KisSelectionMask::KisSelectionMask(const KisSelectionMask& rhs)
this->moveToThread(m_d->image->thread());
connect(KisImageConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged()));
m_d->slotConfigChanged();
m_d->slotConfigChangedImpl(false);
}
KisSelectionMask::~KisSelectionMask()
......@@ -303,7 +304,7 @@ void KisSelectionMask::Private::slotSelectionChangedCompressed()
currentSelection->notifySelectionChanged();
}
void KisSelectionMask::Private::slotConfigChanged()
void KisSelectionMask::Private::slotConfigChangedImpl(bool doUpdates)
{
const KoColorSpace *cs = image ?
image->colorSpace() :
......@@ -313,9 +314,14 @@ void KisSelectionMask::Private::slotConfigChanged()
maskColor = KoColor(cfg.selectionOverlayMaskColor(), cs);
if (image && image->overlaySelectionMask() == q) {
if (doUpdates && image && image->overlaySelectionMask() == q) {
q->setDirty();
}
}
void KisSelectionMask::Private::slotConfigChanged()
{
slotConfigChangedImpl(true);
}
#include "moc_kis_selection_mask.cpp"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment