Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
CB log tab : Copy selection to clipboard
oBFusCATed:
Yes, but you cannot tell from the commit itself.
Hm, isn't it safer to save the selection and then restore it (if there is API available)?
killerbot:
--- Quote from: oBFusCATed on May 12, 2013, 01:34:53 am ---Hm, my commit is 8798 and I don't think it is the cause for the problem.
killerbot: do you have a working version?
--- End quote ---
nope, I think this problem is already present for some long time
Jenna:
--- Quote from: oBFusCATed on May 12, 2013, 03:03:45 am ---Yes, but you cannot tell from the commit itself.
Hm, isn't it safer to save the selection and then restore it (if there is API available)?
--- End quote ---
It's not obvious, that wxWindowUpdateLocker clears the selection, it's also not documented and might be a bug in wxWidgets.
I did not test it with other windows or with wx from trunk.
Nevertheless, if this one line is removed it works as expected !
And I don't think we need to freeze the textcontrol to fetch it's style.
Why should it be safer ?
The update-locker was originally only used when the wrap-mode is changed and that is probably correct here to avoid flickering.
I don't know if it is really needed. In this case a slection will also be cleared, but this can probably be ignored or the selection can be stored and recreated if it is really wanted.
Jenna:
Maybe we should remove the Freeze()-Thaw() stuff in the loggers completely.
Even if it might flicker on linux. On windows they have no effect at all as far as I know.
But they always scroll the textcontrol to the first position.
We can possibly work around this by storing (and restoring) the scroll-position, but I don't know if it is really neeeded.
I don't see any issue, if we do not use Freeze() and Thaw() here.
Only tested on my fedora 18 system with gnome-shell.
oBFusCATed:
Have you tried to build a larger project with lots of warnings to see what is the performance?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version