From c12ea92376d7666d2c8c9eb1cf25a5504f75ba5c Mon Sep 17 00:00:00 2001 From: Gabriele Barbero Date: Mon, 11 Aug 2025 12:22:57 +0200 Subject: [PATCH] tools: destry text style editor each time a textbox is selected This patch ensures that the text style editor is destroyed whenever a text layer is selected, even switching between them clicking on different textboxes. This is necessary to ensure that the on-canvas editor is positioned correctly according to the coordinates of the selected text layer. --- app/tools/gimptexttool.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c index e480f62ca8..84aac79253 100644 --- a/app/tools/gimptexttool.c +++ b/app/tools/gimptexttool.c @@ -551,6 +551,13 @@ gimp_text_tool_button_press (GimpTool *tool, if (text_tool->text && text_tool->text != text) { + if (text_tool->style_overlay) + { + gtk_widget_destroy (text_tool->style_overlay); + text_tool->style_overlay = NULL; + text_tool->style_editor = NULL; + } + gimp_text_tool_editor_start (text_tool); } }