diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-06-19 14:02:40 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2019-07-08 21:04:13 +0000 |
| commit | 311b2f499670dfc26782357a4852a14da224eafc (patch) | |
| tree | c68d4e860ec97c8c221b0477bdff46a155c66278 /src/inkscape.cpp | |
| parent | allow multiple style tags (diff) | |
| download | inkscape-311b2f499670dfc26782357a4852a14da224eafc.tar.gz inkscape-311b2f499670dfc26782357a4852a14da224eafc.zip | |
improve speed not reloading root if only one style tag
Diffstat (limited to '')
| -rw-r--r-- | src/inkscape.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp index b7d2c02c2..205707340 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -675,7 +675,7 @@ Application::add_gtk_css() } } -void Application::readStyleSheets() +void Application::readStyleSheets(bool forceupd) { SPDocument *document = SP_ACTIVE_DOCUMENT; document->setStyleSheet(nullptr); @@ -694,7 +694,9 @@ void Application::readStyleSheets() styleelem->read_content(); } } - document->getRoot()->emitModified( SP_OBJECT_MODIFIED_CASCADE ); + if (forceupd || styles.size > 1) { + document->getRoot()->emitModified( SP_OBJECT_MODIFIED_CASCADE ); + } } /** Sets the keyboard modifier to map to Alt. |
