Commit be08ea98 authored by Halla Rempt's avatar Halla Rempt
Browse files

Add assert to catch problems with colorspaces

parent 63fd0b4b
......@@ -311,11 +311,12 @@ KisNode* KisKraLoader::loadNode(const KoXmlElement& element, KisImageWSP image)
QString colorspacename = element.attribute(COLORSPACE_NAME);
QString colorspaceModel = KoColorSpaceRegistry::instance()->colorSpaceColorModelId(colorspacename).id();
QString colorspaceDepth = KoColorSpaceRegistry::instance()->colorSpaceColorDepthId(colorspacename).id();
dbgFile << "Searching color space: " << colorspacename << colorspaceModel << colorspaceDepth << " for layer: " << name;
// use default profile - it will be replaced later in completeLoading
colorSpace = KoColorSpaceRegistry::instance()->colorSpace(colorspaceModel, colorspaceDepth, "");
dbgFile << "Using color space: " << colorspacename << colorspaceModel << colorspaceDepth << " " << colorSpace << " for layer: " << name;
dbgFile << "found colorspace" << colorSpace;
}
Q_ASSERT(colorSpace);
bool visible = element.attribute(VISIBLE, "1") == "0" ? false : true;
bool locked = element.attribute(LOCKED, "0") == "0" ? false : true;
......
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