summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkamalpreetgrewal <grewalkamal005@gmail.com>2016-07-13 15:08:56 +0000
committerkamalpreetgrewal <grewalkamal005@gmail.com>2016-07-13 15:08:56 +0000
commit0799f58bb7144addd85ba4601899eaf29d92d26c (patch)
tree651f950f16be32b36d7ced612f4f52b5f2a1d448 /src
parentFix crash when deleting selector (diff)
downloadinkscape-0799f58bb7144addd85ba4601899eaf29d92d26c.tar.gz
inkscape-0799f58bb7144addd85ba4601899eaf29d92d26c.zip
Replace s1 with matchSelector
(bzr r14949.1.48)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/styledialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp
index ca4f35bb6..4c4cb03aa 100644
--- a/src/ui/dialog/styledialog.cpp
+++ b/src/ui/dialog/styledialog.cpp
@@ -321,7 +321,7 @@ void StyleDialog::_delSelector()
Glib::ustring selectedRowLabel = row[_mColumns._selectorLabel];
std::string matchSelector = selectedRowLabel;
- REMOVE_SPACES(s1);
+ REMOVE_SPACES(matchSelector);
if (key == matchSelector) {
if (!row.children().empty()) {
for (Gtk::TreeModel::Children::iterator child = row.children().begin();
@@ -341,10 +341,11 @@ void StyleDialog::_delSelector()
/**
* The _stylechild is obtained which contains the style element and
- * the content in style element is updated.
+ * the content in style element is updated. If _selectorVec is
+ * empty, the style element is removed from the XML repr else
+ * the content is updated simply using _updateStyleContent().
*/
_styleChild = _styleElementNode();
-
if (_selectorVec.size() == 0) {
_document->getReprRoot()->removeChild(_styleChild);
_styleExists = false;