Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix pass-through icon jumping when color-overlay is present

Dmitry Kazakove6efae5318ca
diff --git a/plugins/dockers/layerdocker/NodeDelegate.cpp b/plugins/dockers/layerdocker/NodeDelegate.cpp
index 79481e510c..e315b7fd08 100644
--- a/plugins/dockers/layerdocker/NodeDelegate.cpp
+++ b/plugins/dockers/layerdocker/NodeDelegate.cpp
@@ -456,6 +456,17 @@ QList<OptionalProperty> NodeDelegate::Private::rightmostProperties(const KisBase
}
}
+ auto putToTheLeft = [] (QList<OptionalProperty> &list, const QString &id) {
+ auto it = std::find_if(list.begin(), list.end(), kismpl::mem_equal_to(&KisBaseNode::Property::id, id));
+ if (it != list.end()) {
+ std::rotate(list.begin(), it, std::next(it));
+ }
+ };
+
+ putToTheLeft(prependList, KisLayerPropertiesIcons::colorOverlay.id());
+ putToTheLeft(prependList, KisLayerPropertiesIcons::layerColorSpaceMismatch.id());
+ putToTheLeft(prependList, KisLayerPropertiesIcons::layerError.id());
+
{
QMutableListIterator<OptionalProperty> i(prependList);
i.toBack();