summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-03-28 20:07:11 +0000
committerMartin Owens <doctormo@gmail.com>2014-03-28 20:07:11 +0000
commitf43fb7b917895a14e31b7e7f621f2216665732f7 (patch)
tree4d455f0ff47151fa636df0b09df3cc76ccdc61d7 /src
parentFurther refactored SPKnot. (diff)
downloadinkscape-f43fb7b917895a14e31b7e7f621f2216665732f7.tar.gz
inkscape-f43fb7b917895a14e31b7e7f621f2216665732f7.zip
Remove _onApply and strdup the char from the label before it gets corrupted. Fixes bug #1299185
Fixed bugs: - https://launchpad.net/bugs/1299185 (bzr r13227)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/guides.cpp14
-rw-r--r--src/ui/dialog/guides.h1
2 files changed, 3 insertions, 12 deletions
diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp
index e84f25733..0e754106d 100644
--- a/src/ui/dialog/guides.cpp
+++ b/src/ui/dialog/guides.cpp
@@ -100,7 +100,7 @@ void GuidelinePropertiesDialog::_modeChanged()
}
}
-void GuidelinePropertiesDialog::_onApply()
+void GuidelinePropertiesDialog::_onOK()
{
double deg_angle = _spin_angle.getValue(DEG);
if (!_mode)
@@ -125,17 +125,13 @@ void GuidelinePropertiesDialog::_onApply()
sp_guide_moveto(*_guide, newpos, true);
const gchar* name = _label_entry.getEntry()->get_text().c_str();
- sp_guide_set_label(*_guide, name, true);
+
+ sp_guide_set_label(*_guide, g_strdup(name), true);
DocumentUndo::done(_guide->document, SP_VERB_NONE,
_("Set guide properties"));
}
-void GuidelinePropertiesDialog::_onOK()
-{
- _onApply();
-}
-
void GuidelinePropertiesDialog::_onDelete()
{
SPDocument *doc = _guide->document;
@@ -157,10 +153,6 @@ void GuidelinePropertiesDialog::_response(gint response)
break;
case Gtk::RESPONSE_DELETE_EVENT:
break;
-/* case GTK_RESPONSE_APPLY:
- _onApply();
- break;
-*/
default:
g_assert_not_reached();
}
diff --git a/src/ui/dialog/guides.h b/src/ui/dialog/guides.h
index 422fed7fe..76b830e70 100644
--- a/src/ui/dialog/guides.h
+++ b/src/ui/dialog/guides.h
@@ -62,7 +62,6 @@ public:
protected:
void _setup();
- void _onApply();
void _onOK();
void _onDelete();