diff options
Diffstat (limited to 'src/ui/tools/pencil-tool.cpp')
| -rw-r--r-- | src/ui/tools/pencil-tool.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp index 3705d0f43..6f64e8e26 100644 --- a/src/ui/tools/pencil-tool.cpp +++ b/src/ui/tools/pencil-tool.cpp @@ -475,10 +475,10 @@ void PencilTool::_cancel() { this->red_curve->reset(); sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), NULL); - while (this->green_bpaths) { - sp_canvas_item_destroy(SP_CANVAS_ITEM(this->green_bpaths->data)); - this->green_bpaths = g_slist_remove(this->green_bpaths, this->green_bpaths->data); + for (auto i:this->green_bpaths) { + sp_canvas_item_destroy(i); } + this->green_bpaths.clear(); this->green_curve->reset(); if (this->green_anchor) { this->green_anchor = sp_draw_anchor_destroy(this->green_anchor); @@ -493,7 +493,7 @@ void PencilTool::_cancel() { bool PencilTool::_handleKeyPress(GdkEventKey const &event) { bool ret = false; - switch (get_group0_keyval(&event)) { + switch (get_latin_keyval(&event)) { case GDK_KEY_Up: case GDK_KEY_Down: case GDK_KEY_KP_Up: @@ -546,7 +546,7 @@ bool PencilTool::_handleKeyPress(GdkEventKey const &event) { bool PencilTool::_handleKeyRelease(GdkEventKey const &event) { bool ret = false; - switch (get_group0_keyval(&event)) { + switch (get_latin_keyval(&event)) { case GDK_KEY_Alt_L: case GDK_KEY_Alt_R: case GDK_KEY_Meta_L: @@ -1067,7 +1067,7 @@ void PencilTool::_fitAndSplit() { } sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(cshape), this->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT); - this->green_bpaths = g_slist_prepend(this->green_bpaths, cshape); + this->green_bpaths.push_back(cshape); this->red_curve_is_valid = false; } |
