From 69b0dc7a8e7683d87ea795dd6cdf1de6945706c0 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 1 Jul 2026 12:07:06 +0200 Subject: [PATCH] paint: add clear button to select tool --- paint/sources/ui/ui_header.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paint/sources/ui/ui_header.c b/paint/sources/ui/ui_header.c index 3ac514d1..66e1131f 100644 --- a/paint/sources/ui/ui_header.c +++ b/paint/sources/ui/ui_header.c @@ -552,6 +552,14 @@ void ui_header_draw_tool_properties() { } } } + else if (g_context->tool == TOOL_TYPE_SELECT) { + g_ui->enabled = g_context->select_active; + if (ui_icon_button(tr("Clear"), ICON_ERASE, UI_ALIGN_CENTER)) { + g_context->select_active = false; + make_material_parse_paint_material(false); + } + g_ui->enabled = true; + } if (g_context->tool == TOOL_TYPE_CURSOR) { // if (!sim_running && ui_button("Play")) {