Repository navigation
Fix TText::Execute event - #23153
Merged
Merged
Fix TText::Execute event#23153
TText::Execute event#23153Conversation
TText uses static variables to keep previous mouse position. These variables must be set before calling TPad::ModifiedUpate() while on Mac it involves mouse events execution. Therefore new TText::ExecuteEvent can be called and use wrong coordinates. Results in wrong text moving behaviour Problem appears only on the Mac.
Like in TText, change static variable before calling pad.ModifiedUpdate() to exclude problem while on Mac TLine::ExecuteEvent can be called again
Use less static variables and more local variables When resize text - use methods to get and set text size in pixels
bellenot
approved these changes
Aug 26, 2026
bellenot
left a comment
Member
There was a problem hiding this comment.
OK with me if it works... But since I can't test on MacOS, I'd like Olivier to review it next week
Test Results 23 files 23 suites 3d 12h 4m 20s ⏱️ Results for commit ee9c7cc. |
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.
In several classes
TPad::ModifiedUpdate()used inExecuteEvent()methods - for instanceTTextorTLine.But on the Mac
ModifiedUpdate()involves event execution loop - which may lead again to invocation ofExecuteEvent()method of the same object. If static variable used inside - it must be set correctly before invokingModifiedUpdate().Such change was implemented in TText and TLine classes.
Without such fix on Mac moving of
TText/TLatexobjects leads to over-moving -- object is shifted by 100 pixels when mouse moved only by 20-30 pixels.Adjust implementation of
TText::ExecuteEvent()to have better variable management.