Commit dca2338d authored by Ivan Yossi's avatar Ivan Yossi 👌
Browse files

Fix wrong relative reference on fileLayers first save

doc->path() is empty the first time the document saves, this causes
FileLayrs reference to be broken on first save as it makes the relative
reference from the launch directory and not the saved location.
parent 62aa7083
......@@ -121,7 +121,7 @@ QDomElement KisKraSaver::saveXML(QDomDocument& doc, KisImageSP image)
}
quint32 count = 1; // We don't save the root layer, but it does count
KisSaveXmlVisitor visitor(doc, imageElement, count, m_d->doc->path(), true);
KisSaveXmlVisitor visitor(doc, imageElement, count, m_d->filename, true);
visitor.setSelectedNodes({m_d->doc->preActivatedNode()});
image->rootLayer()->accept(visitor);
......
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