diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-01 17:00:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-01 17:00:00 +0000 |
| commit | 208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch) | |
| tree | 79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/ui/tools/dropper-tool.cpp | |
| parent | update to trunk (diff) | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip | |
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/ui/tools/dropper-tool.cpp')
| -rw-r--r-- | src/ui/tools/dropper-tool.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/ui/tools/dropper-tool.cpp b/src/ui/tools/dropper-tool.cpp index 9c47b50e9..99d42a211 100644 --- a/src/ui/tools/dropper-tool.cpp +++ b/src/ui/tools/dropper-tool.cpp @@ -72,21 +72,17 @@ const std::string& DropperTool::getPrefsPath() { const std::string DropperTool::prefsPath = "/tools/dropper"; -DropperTool::DropperTool() : ToolBase() { - this->R = 0; - this->G = 0; - this->B = 0; - this->alpha = 0; - this->dragging = false; - - this->grabbed = 0; - this->area = 0; - this->centre = Geom::Point(0, 0); - - this->cursor_shape = cursor_dropper_f_xpm; - this->hot_x = 7; - this->hot_y = 7; - +DropperTool::DropperTool() + : ToolBase(cursor_dropper_f_xpm, 7, 7) + , R(0) + , G(0) + , B(0) + , alpha(0) + , dragging(false) + , grabbed(NULL) + , area(NULL) + , centre(0, 0) +{ cursor_dropper_fill = sp_cursor_new_from_xpm(cursor_dropper_f_xpm , 7, 7); cursor_dropper_stroke = sp_cursor_new_from_xpm(cursor_dropper_s_xpm , 7, 7); } @@ -152,6 +148,8 @@ void DropperTool::finish() { #endif cursor_dropper_fill = NULL; } + + ToolBase::finish(); } /** @@ -338,6 +336,10 @@ bool DropperTool::root_handler(GdkEvent* event) { if (prefs->getBool("/tools/dropper/onetimepick", false)) { prefs->setBool("/tools/dropper/onetimepick", false); sp_toggle_dropper(desktop); + + // sp_toggle_dropper will delete ourselves. + // Thus, make sure we return immediately. + return true; } ret = TRUE; |
