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.
This commit is contained in:
Gabriele Barbero 2025-08-11 12:22:57 +02:00 committed by Jehan
parent f089ed69d7
commit c12ea92376

View file

@ -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);
}
}