Skip to content

[6.42] [gui] [pad] fix text insert via tool button - #24059

Merged
linev merged 2 commits into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_24032
Nov 9, 2026
Merged

linev merged 2 commits into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_24032

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #24032, requested by @linev.

linev added 2 commits November 9, 2026 06:18
kEditor was exists before, but not supported in TROOT::SetEditorMode

(cherry picked from commit 76798d5)
When TLatex tool button was clicked before,
any following mouse click on the pad insert new TLatex object
keeping previous one with empty text. As a result - after many clicks
dozens of dummy TLatex object were remain in the pad (just try gPad->ls())
Plus static fgText pointer used in TCreatePrimitives can store invalid pointer
and may lead to ROOT crash.

Therefore rewrite TCreatePrimitives::Text() functionality using
`TPad::Interactive()` features. Like with objects dragging add temporary
`TTextEditInteractive` instance which holds pointer on TLatex. Any keyboard
press will be handled only when interactive object exists.

Also avoid create multiple `TLatex` by multiple mouse clicking on pad.
If latex was created, then second click will just finish editing of this latex object.

(cherry picked from commit b0827a0)
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Test Results

    24 files      24 suites   3d 23h 13m 38s ⏱️
 3 880 tests  3 863 ✅ 0 💤 17 ❌
83 574 runs  83 557 ✅ 0 💤 17 ❌

For more details on these failures, see this check.

Results for commit 2bf6301.

@linev
linev merged commit 05f1d1e into root-project:v6-42-00-patches Nov 9, 2026
33 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants