]> git.sesse.net Git - mlt/commitdiff
kdenlivetitle_wrapper.cpp: use changed format of title-xml
authorMarco Gittler <g.marco@freenet.de>
Fri, 24 Jul 2009 10:42:36 +0000 (12:42 +0200)
committerMarco Gittler <g.marco@freenet.de>
Fri, 24 Jul 2009 10:42:36 +0000 (12:42 +0200)
src/modules/qimage/kdenlivetitle_wrapper.cpp

index dfc27397ea123b2931e3f5f006b1752c55796359..b5468d9a2057eb2ede05fdc0124defa0eba87dd1 100644 (file)
@@ -130,7 +130,20 @@ int Title::loadFromXml( QDomDocument doc, QGraphicsPolygonItem* startv, QGraphic
                                {
                                        QDomNamedNodeMap txtProperties = items.item( i ).namedItem( "content" ).attributes();
                                        QFont font( txtProperties.namedItem( "font" ).nodeValue() );
-                                       font.setBold( txtProperties.namedItem( "font-bold" ).nodeValue().toInt() );
+
+                                       QDomNode node = txtProperties.namedItem( "font-bold" );
+                                       if ( !node.isNull() )
+                                       {
+                                               // Old: Bold/Not bold.
+                                               font.setBold( node.nodeValue().toInt() );
+                                       }
+                                       else
+                                       {
+                                               // New: Font weight (QFont::)
+                                               font.setWeight( txtProperties.namedItem( "font-weight" ).nodeValue().toInt() );
+                                       }
+
+                                       //font.setBold(txtProperties.namedItem("font-bold").nodeValue().toInt());
                                        font.setItalic( txtProperties.namedItem( "font-italic" ).nodeValue().toInt() );
                                        font.setUnderline( txtProperties.namedItem( "font-underline" ).nodeValue().toInt() );
                                        // Older Kdenlive version did not store pixel size but point size