Commit 61125872 authored by Sven Langkamp's avatar Sven Langkamp
Browse files

load and save layer visibility in openraster

BUG:277200
parent fe734322
......@@ -105,6 +105,11 @@ void KisOpenRasterStackLoadVisitor::loadLayerInfo(const QDomElement& elem, KisLa
layer->setName(elem.attribute("name"));
layer->setX(elem.attribute("x").toInt());
layer->setY(elem.attribute("y").toInt());
if(elem.attribute("visibility") == "hidden") {
layer->setVisible(false);
} else {
layer->setVisible(true);
}
QString compop = elem.attribute("composite-op");
if (compop.startsWith("svg:")) {
......
......@@ -54,6 +54,7 @@ void KisOpenRasterStackSaveVisitor::saveLayerInfo(QDomElement& elt, KisLayer* la
{
elt.setAttribute("name", layer->name());
elt.setAttribute("opacity", layer->opacity() / 255.0);
elt.setAttribute("visibility", layer->visible() ? "visible" : "hidden");
QString compop = layer->compositeOpId();
if (layer->compositeOpId() == COMPOSITE_CLEAR) compop = "svg:clear";
......
Supports Markdown
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