summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/text-tool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/tools/text-tool.cpp')
-rw-r--r--src/ui/tools/text-tool.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index 4de0dc81f..f27f37300 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -244,10 +244,9 @@ void TextTool::finish() {
this->frame = nullptr;
}
- for (std::vector<SPCanvasItem*>::iterator it = this->text_selection_quads.begin() ;
- it != this->text_selection_quads.end() ; ++it) {
- sp_canvas_item_hide(*it);
- sp_canvas_item_destroy(*it);
+ for (auto & text_selection_quad : this->text_selection_quads) {
+ sp_canvas_item_hide(text_selection_quad);
+ sp_canvas_item_destroy(text_selection_quad);
}
this->text_selection_quads.clear();
@@ -1702,9 +1701,9 @@ static void sp_text_context_update_text_selection(TextTool *tc)
// the selection update (can't do both atomically, alas)
if (!tc->desktop) return;
- for (std::vector<SPCanvasItem*>::iterator it = tc->text_selection_quads.begin() ; it != tc->text_selection_quads.end() ; ++it) {
- sp_canvas_item_hide(*it);
- sp_canvas_item_destroy(*it);
+ for (auto & text_selection_quad : tc->text_selection_quads) {
+ sp_canvas_item_hide(text_selection_quad);
+ sp_canvas_item_destroy(text_selection_quad);
}
tc->text_selection_quads.clear();