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

Entry refreshes too often #4397

Closed
2 tasks done
andydotxyz opened this issue Nov 17, 2023 · 2 comments
Closed
2 tasks done

Entry refreshes too often #4397

andydotxyz opened this issue Nov 17, 2023 · 2 comments
Labels
bug Something isn't working optimization Tickets that could help Fyne apps run faster refactor Issues related to refactoring code.

Comments

@andydotxyz
Copy link
Member

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

In interactive steps (especially when cursor moves, like paste) the entry is refreshed many times.
We should try to reduce any refreshes that occur in quick succession in case they result in multiple frame draws.

How to reproduce

paste lots?

Screenshots

No response

Example code

n/a

Fyne version

v2.4.2

Go compiler version

1.20.2

Operating system and version

All

Additional Information

As discussed in #4396

@andydotxyz andydotxyz added the unverified A bug that has been reported but not verified label Nov 17, 2023
@dweymouth dweymouth added the optimization Tickets that could help Fyne apps run faster label Nov 17, 2023
@Jacalz Jacalz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Nov 18, 2023
@Dorbmon
Copy link
Contributor

Dorbmon commented Dec 17, 2023

How about to add a flag to disable the refresh? We can set that flag before we call some functions, then disable the flag after the procedure we need. After that, we can do the refresh manually.
All we need to do is to add the code to check the refresh flag in the Refresh() and update the flag where we need.

@Jacalz
Copy link
Member

Jacalz commented Dec 17, 2023

I think it is better to rework all the internal methods to not refresh and then have the exported methods refresh (or something along those lines). Some kind of refactoring basically. Having a flag in the struct to disable a specific function seems like a bad practice in my opinion.

@Jacalz Jacalz added the refactor Issues related to refactoring code. label Dec 17, 2023
Jacalz added a commit to Jacalz/fyne that referenced this issue Feb 27, 2024
Also includes a fix where SelectedText() allocated all of the new text once again.

For fyne-io#4397
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working optimization Tickets that could help Fyne apps run faster refactor Issues related to refactoring code.
Projects
None yet
Development

No branches or pull requests

4 participants