summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/document.cpp2
-rw-r--r--src/file-update.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 96dce8d2c..f923a45d6 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -451,7 +451,7 @@ SPDocument *SPDocument::createDoc(Inkscape::XML::Document *rdoc,
}
/** Fix first line spacing in legacy documents (pre-1.0 files) **/
- if ( sp_version_inside_range( document->root->version.inkscape, 0, 1, 1, 0 ) ) {
+ if (sp_version_inside_range(document->root->version.inkscape, 0, 1, 1, 0)) {
sp_file_remove_style_on_empty_lines(document);
}
diff --git a/src/file-update.cpp b/src/file-update.cpp
index de2f17ad6..84a598f8e 100644
--- a/src/file-update.cpp
+++ b/src/file-update.cpp
@@ -209,9 +209,10 @@ void _remove_style_on_empty_lines(SPObject *o)
{
std::vector<SPObject *> cl = o->childList(false);
for (std::vector<SPObject *>::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) {
- if (SP_IS_TSPAN(*ci) and (*ci)->childList(false).empty() and (*ci)->getAttribute("sodipodi:role")=="line" ) {
- (*ci)->style->clear();
- }
+ if (SP_IS_TSPAN(*ci) and (*ci)->childList(false).empty() and is_line(*ci)) {
+ (*ci)->removeAttribute("style");
+ (*ci)->updateRepr();
+ }
}
}