Commit 96e439fc authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

temp

parent 607fca8d
......@@ -313,6 +313,8 @@ void KisAsyncMerger::resetProjection() {
void KisAsyncMerger::setupProjection(KisProjectionLeafSP currentLeaf, const QRect& rect, bool useTempProjection) {
KisPaintDeviceSP parentOriginal = currentLeaf->parent()->original();
//ENTER_FUNCTION() << ppVar(currentLeaf->node()) << ppVar((parentOriginal != currentLeaf->projection())) << ppVar(useTempProjection);
if (parentOriginal != currentLeaf->projection()) {
if (useTempProjection) {
if(!m_cachedPaintDevice)
......
......@@ -226,7 +226,13 @@ KisLayer* KisGroupLayer::onlyMeaningfulChild() const
KisPaintDeviceSP KisGroupLayer::tryObligeChild() const
{
const KisLayer *child = onlyMeaningfulChild();
const KisLayer *child = shouldObligeChild();
return child ? child->projection() : 0;
}
KisLayer* KisGroupLayer::shouldObligeChild() const
{
KisLayer *child = onlyMeaningfulChild();
if (child &&
child->channelFlags().isEmpty() &&
......@@ -243,7 +249,7 @@ KisPaintDeviceSP KisGroupLayer::tryObligeChild() const
m_d->paintDevice->defaultPixel().opacityU8();
if(defaultOpacity == OPACITY_TRANSPARENT_U8) {
return child->projection();
return child;
}
}
......@@ -269,6 +275,12 @@ KisPaintDeviceSP KisGroupLayer::original() const
return realOriginal;
}
QRect KisGroupLayer::changeRect(const QRect &rect, PositionToFilthy pos) const
{
return shouldObligeChild() && !hasEffectMasks() ?
rect : KisLayer::changeRect(rect, pos);
}
KisPaintDeviceSP KisGroupLayer::paintDevice() const
{
return 0;
......
......@@ -95,9 +95,12 @@ public:
bool projectionIsValid() const;
QRect changeRect(const QRect &rect, PositionToFilthy pos) const override;
protected:
KisLayer* onlyMeaningfulChild() const;
KisPaintDeviceSP tryObligeChild() const;
KisLayer* shouldObligeChild() const;
private:
bool checkCloneLayer(KisCloneLayerSP clone) const;
......
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