Commit 8884943c authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix handling Inherit Alpha/Lock Alpha by filters

1) When applying, filters should treat "Lock Alpha" instead of
   "Inherit Alpha".

2) Filter masks should not handle parent layer's alpha locks
   at all

BUG:397364
parent 30796fca
......@@ -59,9 +59,6 @@ QIcon KisFilterMask::icon() const
void KisFilterMask::setFilter(KisFilterConfigurationSP filterConfig)
{
if (parent() && parent()->inherits("KisLayer")) {
filterConfig->setChannelFlags(qobject_cast<KisLayer*>(parent().data())->channelFlags());
}
KisNodeFilterInterface::setFilter(filterConfig);
}
......
......@@ -29,6 +29,7 @@
#include <kis_filter_mask.h>
#include <kis_node.h>
#include <kis_layer.h>
#include <kis_paint_layer.h>
#include <KisViewManager.h>
#include <kis_config.h>
......@@ -131,8 +132,8 @@ void KisDlgFilter::startApplyingFilter(KisFilterConfigurationSP config)
{
if (!d->uiFilterDialog.filterSelection->configuration()) return;
if (d->node->inherits("KisLayer")) {
config->setChannelFlags(qobject_cast<KisLayer*>(d->node.data())->channelFlags());
if (d->node->inherits("KisPaintLayer")) {
config->setChannelFlags(qobject_cast<KisPaintLayer*>(d->node.data())->channelLockFlags());
}
d->filterManager->apply(config);
......
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