[graphics] fix crash during objects dragging, improve TLine::ExecuteEvent#21872
Merged
linev merged 5 commits intoroot-project:masterfrom Apr 10, 2026
Merged
[graphics] fix crash during objects dragging, improve TLine::ExecuteEvent#21872linev merged 5 commits intoroot-project:masterfrom
linev merged 5 commits intoroot-project:masterfrom
Conversation
One need to cleanup guideline pad and respective objects.
Guideline objects must be cleaned up
One need to cleanup guidelines objects
Use line native coordinates for painting - they are anyway needed when set back Therefore exclude conversion from NDC to normal coordinates during moving Simplify/harmonize logic how first/second points are handled during movement
Use more clear conversion of coordinates to pixels. No need to reset pad painter attributes
linev
added a commit
to linev/root
that referenced
this pull request
Apr 9, 2026
If `Esc` key pressed when dragging object guideline pad not cleaned correctly and leave invalid pointer. Also restore NDC flag of TLine in such case. This is backport of some changes from root-project#21872
Test Results 22 files 22 suites 3d 2h 53m 28s ⏱️ Results for commit c2af043. |
couet
approved these changes
Apr 10, 2026
linev
added a commit
that referenced
this pull request
Apr 10, 2026
If `Esc` key pressed when dragging object guideline pad not cleaned correctly and leave invalid pointer. Also restore NDC flag of TLine in such case. This is backport of some changes from #21872
root-project-bot
pushed a commit
to root-project-bot/root
that referenced
this pull request
Apr 10, 2026
If `Esc` key pressed when dragging object guideline pad not cleaned correctly and leave invalid pointer. Also restore NDC flag of TLine in such case. This is backport of some changes from root-project#21872 (cherry picked from commit c57c616)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For several classes like
TBox,TLine,TEllipseROOT will crash if during mouse dragging one pressEsckeyand then will try to click on pad or just do something. Problem is remaining invalid pointer on temporary
guidelinepad which then accessed by mouse clicking. Fixing all concerned classes, backport for older ROOT versions will be provided.Adjust
TLine::ExecuteEvent:TPadPainterfunctionality, avoidgVirtualXTLinecoordinates from/to NDC during dragginggPadusage, reduce number of static variables.Also adjust a bit code in
TBox::ExecuteEvent.One need to fully avoids usage of static variables in
ExecuteEventmethods. This will be done in next PRs.