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++

Discount global selection masks in export warning

Carsten Hartenfelsfd2e3f54a613
diff --git a/libs/impex/NodeTypeCheck.h b/libs/impex/NodeTypeCheck.h
index 46328b4230..b4c105b728 100644
--- a/libs/impex/NodeTypeCheck.h
+++ b/libs/impex/NodeTypeCheck.h
@@ -33,8 +33,11 @@ public:
KisCountVisitor v(nodetypes, props);
image->rootLayer()->accept(v);
- // There is always one group layer, the root layer.
- if (m_nodeType == "KisGroupLayer") {
+ // There is always one group layer, the root layer. When checking
+ // selection masks, discount the global selection mask, since that's
+ // ephemeral and not worth warning about.
+ if (m_nodeType == QStringLiteral("KisGroupLayer")
+ || (m_nodeType == QStringLiteral("KisSelectionMask") && image->rootLayer()->selectionMask())) {
return (v.count() > 1);
}
else {