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

Remove unnecessary (?) calls to Update #178

Open
pyscripter opened this issue Feb 17, 2022 Discussed in #176 · 2 comments
Open

Remove unnecessary (?) calls to Update #178

pyscripter opened this issue Feb 17, 2022 Discussed in #176 · 2 comments

Comments

@pyscripter
Copy link
Contributor

pyscripter commented Feb 17, 2022

Remove Update call from TCustomSynEdit.UpdateScrollBars, TSynEditScrollBars.WMVScroll and DoMouseWheel.

Discussed in #176

Originally posted by MShark67 February 17, 2022
When I converted the Scrollbar code, I kept the existing Update calls as I didn't want to change any behavior (perhaps ones I didn't understand.) Does anyone know why these are there? They cause issues if you need to load a number of SynEdits in a loop (basically each one will force paint itself, causing slowdowns and flashing.) Removing the calls fixes that issue and I haven't noticed any problems with removing them, but they must be there for a reason I don't know about.

@MShark67
Copy link
Contributor

I just wanted to clarify that the other update call to possibly remove is the one in TCustomSynEdit.UpdateScrollBars. I've tested with removing this one and the ones in TSynEditScrollBars and so far, I haven't found a case where they're needed. And I totally agree that WM_SETREDRAW (or the new LockDrawing and UnLockDrawing built into TWinControl) works around the issues nicely. However, those extra calls just kind of bother me since I suspect they aren't needed.

@pyscripter
Copy link
Contributor Author

pyscripter commented Feb 17, 2022

Test for a little while longer and then please submit a PR to close the issue. Remove all calls to Update that are not needed.
Possibly the issue I had was related the WS_EX_COMPOSITED option that was removed. Not sure. Would be nice to get rid of those calls if they are not needed.

@pyscripter pyscripter changed the title Remove Update call from TSynEditScrollBars.WMVScroll and DoMouseWheel Remove Update call from TCustomSynEdit.UpdateScrollBars, TSynEditScrollBars.WMVScroll and DoMouseWheel Feb 18, 2022
@pyscripter pyscripter changed the title Remove Update call from TCustomSynEdit.UpdateScrollBars, TSynEditScrollBars.WMVScroll and DoMouseWheel Remove calls to Update Feb 18, 2022
@pyscripter pyscripter changed the title Remove calls to Update Remove unnecessary (?) calls to Update Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants