summaryrefslogtreecommitdiffstats
path: root/src/ui/toolbar/eraser-toolbar.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2019-01-22 00:58:29 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2019-01-22 00:58:29 +0000
commit955ce1d8047673f3a17aa06f5f0f0f1563cf19b5 (patch)
tree3fec2bc3c7487055889c709b30dec7615273e681 /src/ui/toolbar/eraser-toolbar.cpp
parentNodeToolbar: Fix initialisation (diff)
downloadinkscape-955ce1d8047673f3a17aa06f5f0f0f1563cf19b5.tar.gz
inkscape-955ce1d8047673f3a17aa06f5f0f0f1563cf19b5.zip
NodeToolbar: Fix initialisation
Diffstat (limited to 'src/ui/toolbar/eraser-toolbar.cpp')
-rw-r--r--src/ui/toolbar/eraser-toolbar.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ui/toolbar/eraser-toolbar.cpp b/src/ui/toolbar/eraser-toolbar.cpp
index 496623d1e..f5631f362 100644
--- a/src/ui/toolbar/eraser-toolbar.cpp
+++ b/src/ui/toolbar/eraser-toolbar.cpp
@@ -52,11 +52,6 @@ using Inkscape::UI::PrefPusher;
namespace Inkscape {
namespace UI {
namespace Toolbar {
-EraserToolbar::~EraserToolbar()
-{
- if(_pressure_pusher) delete _pressure_pusher;
-}
-
GtkWidget *
EraserToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
{
@@ -136,7 +131,7 @@ EraserToolbar::prep(SPDesktop *desktop, GtkActionGroup* mainActions)
INKSCAPE_ICON("draw-use-pressure"),
GTK_ICON_SIZE_MENU );
gtk_action_group_add_action( mainActions, GTK_ACTION( toolbar->_usepressure ) );
- toolbar->_pressure_pusher = new PrefPusher(GTK_TOGGLE_ACTION(toolbar->_usepressure), "/tools/eraser/usepressure", update_presets_list, (gpointer)toolbar);
+ toolbar->_pressure_pusher.reset(new PrefPusher(GTK_TOGGLE_ACTION(toolbar->_usepressure), "/tools/eraser/usepressure", update_presets_list, (gpointer)toolbar));
}