]> git.sesse.net Git - kdenlive/blobdiff - src/titledocument.cpp
Fix loading / saving of outline color
[kdenlive] / src / titledocument.cpp
index 04d304a755f894b81c5cfb990ba71cfe71e7321c..d894d4d83f62cee745e8614e92d0132591d438f9 100644 (file)
@@ -96,17 +96,14 @@ QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* en
             content.setAttribute("font-pixel-size", font.pixelSize());
             content.setAttribute("font-italic", font.italic());
             content.setAttribute("font-underline", font.underline());
-
             {
-
                 QTextCursor cursor(t->document());
                 cursor.select(QTextCursor::Document);
                 QColor fontcolor = cursor.charFormat().foreground().color();
                 content.setAttribute("font-color", colorToString(fontcolor));
-                content.setAttribute("font-outline", t->data(101).toDouble());
-                content.setAttribute("font-outline-color", t->data(102).toString());
+                if (!t->data(101).isNull()) content.setAttribute("font-outline", t->data(101).toDouble());
+                if (!t->data(102).isNull()) content.setAttribute("font-outline-color", colorToString(QColor(t->data(102).toString())));
             }
-
             if (!t->data(100).isNull()) {
                 QStringList effectParams = t->data(100).toStringList();
                 QString effectName = effectParams.takeFirst();