summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/styledialog.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2017-06-07 11:09:49 +0000
committerjabiertxof <info@marker.es>2017-06-07 11:09:49 +0000
commite653cfebf985eef47e2a643d4eb6faefb741a848 (patch)
tree26685a3ce48c06b1f846ad25f8f3b500cde638f7 /src/ui/dialog/styledialog.cpp
parentupdate to trunk (diff)
parentMerge LPE bool from Michael Soegtrop (diff)
downloadinkscape-e653cfebf985eef47e2a643d4eb6faefb741a848.tar.gz
inkscape-e653cfebf985eef47e2a643d4eb6faefb741a848.zip
Update to trunk
(bzr r15721)
Diffstat (limited to 'src/ui/dialog/styledialog.cpp')
-rw-r--r--src/ui/dialog/styledialog.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp
index 4576671e7..b1bcddd45 100644
--- a/src/ui/dialog/styledialog.cpp
+++ b/src/ui/dialog/styledialog.cpp
@@ -355,6 +355,12 @@ void StyleDialog::_readStyleElement()
// Remove end-of-lines (check it works on Windoze).
content.erase(std::remove(content.begin(), content.end(), '\n'), content.end());
+ // Remove comments (/* xxx */)
+ while(content.find("/*") != std::string::npos) {
+ size_t start = content.find("/*");
+ content.erase(start, (content.find("*/", start) - start) +2);
+ }
+
// First split into selector/value chunks.
// An attempt to use Glib::Regex failed. A C++11 version worked but
// reportedly has problems on Windows. Using split_simple() is simpler
@@ -787,7 +793,7 @@ void StyleDialog::_addSelector()
* set to ".Class1"
*/
selectorValue = textEditPtr->get_text();
- Glib::ustring firstWord = selectorValue.substr(0, selectorValue.find(" "));
+ Glib::ustring firstWord = selectorValue.substr(0, selectorValue.find_first_of(" >+~"));
del->set_sensitive(true);