Commit 6386356f authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix saving state of the selection masks into .kra

parent 380e271d
......@@ -463,11 +463,12 @@ void KisLayer::updateSelectionMask()
{
KoProperties properties;
properties.setProperty("active", true);
properties.setProperty("visible", true);
QList<KisNodeSP> masks = childNodes(QStringList("KisSelectionMask"), properties);
// return the first visible mask
Q_FOREACH (KisNodeSP mask, masks) {
if (mask->visible()) {
if (mask) {
m_d->selectionMask = dynamic_cast<KisSelectionMask*>(mask.data());
return;
}
......
......@@ -1007,7 +1007,7 @@ KisPaintDevice::KisPaintDevice(const KisPaintDevice& rhs, KritaUtils::DeviceCopy
// copy data objects with or without frames
m_d->cloneAllDataObjects(rhs.m_d, copyMode == KritaUtils::CopyAllFrames);
if (copyMode == KritaUtils::CopyAllFrames) {
if (copyMode == KritaUtils::CopyAllFrames && rhs.m_d->framesInterface) {
KIS_ASSERT_RECOVER_RETURN(rhs.m_d->framesInterface);
KIS_ASSERT_RECOVER_RETURN(rhs.m_d->contentChannel);
m_d->framesInterface.reset(new KisPaintDeviceFramesInterface(this));
......
......@@ -70,7 +70,6 @@ KisSelectionMask::KisSelectionMask(const KisSelectionMask& rhs)
: KisMask(rhs)
, m_d(new Private(this))
{
setActive(false);
m_d->image = rhs.image();
m_d->updatesCompressor =
new KisThreadSafeSignalCompressor(300, KisSignalCompressor::POSTPONE);
......
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