summaryrefslogtreecommitdiffstats
path: root/src/file-update.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-04-19 23:19:45 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2019-04-24 13:16:46 +0000
commita545384a9246881ba14effeafef924ffc3eca27d (patch)
treeba26bdced3b917bd68ec665c541af40392beffec /src/file-update.cpp
parentRemoves style on empty lines (diff)
downloadinkscape-a545384a9246881ba14effeafef924ffc3eca27d.tar.gz
inkscape-a545384a9246881ba14effeafef924ffc3eca27d.zip
Fix style and line detection
Diffstat (limited to 'src/file-update.cpp')
-rw-r--r--src/file-update.cpp7
1 files changed, 4 insertions, 3 deletions
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();
+ }
}
}