Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of MouseActions::drawn #844

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

wawuwo
Copy link
Collaborator

@wawuwo wawuwo commented Jul 14, 2024

Hi!

Probably you've seen lines like

drawn = false;

or

view->drawn = false;

and so on scattered all around the codebase. This flag is mostly set to 'false' and only occasionally to 'true', and when it's 'true' it enables blocks of code which are described as "erase old symbol". I honestly tried to grasp its meaning and purpose, what "old symbol" is being erased, and I failed. I started thinking that it would be easier to remove it and see what effect it would make.

I tried removing it and surprisingly (or not?) there was no difference at all. Everything looked and behaved as usual, at least at first sight. And now I am asking you to kindly include this change to mainline to test it in real life conditions (testing in prod, yeah 😞).

If there will be no problems discovered in, say, week or month, than we'll be happy having get rid of the dead code. In other case I'll revert it. I crammed everything in a single large commit for the sake of easier reverting if it will be needed later.

'drawn' is some obscure flag which is scattered all around
the codebase, it's mostly set to 'false' and only occasionally
to 'true'. It controls blocks of code which are described as
"erase old symbol".

Honestly, I tried to grasp it's meaning and purpose, and I failed.
I believe this flag is just a legacy no one can remember of, and
it's OK to remove it.

Removing 'MouseActions::drawn' completely doesn't seem to change
something, at least at first sight everything looks the same as
usual.

I cram everything in a single large commit for the sake of easier
reverting if it will be needed later.
@ra3xdh ra3xdh added this to the 24.4.0 milestone Jul 15, 2024
@ra3xdh
Copy link
Owner

ra3xdh commented Jul 16, 2024

I can schedule the merging of this soon after the v24.3.0 release. I am planning to prepare the release packages in this week. I have assigned v24.4.0 milestone to this PR.

@ra3xdh ra3xdh merged commit bd210e9 into ra3xdh:current Aug 2, 2024
6 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Aug 2, 2024

I didn't find any side effects on this PR. Merging.

@wawuwo wawuwo deleted the get-rid-of-mouseactions-drawn branch August 3, 2024 14:35
@ra3xdh ra3xdh modified the milestones: 24.4.0, 24.3.1 Sep 1, 2024
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.

2 participants