Losing focus = text changed?


#1

Jules, I’m curious why TextEditor::focusLost() sends a “TextChanged” message, since losing focus doesn’t actually change the text. The “FocusLost” message seems to be sufficient, but maybe you require it for some inner workings?

If I am displaying a window with a few text editor controls and use textEditorTextChanged() to detect when a user has “dirtied” the window, I get false hits every time the focus changes. I suppose I could check the text value of the editor against a stored value to see if it’s actually changed, but that will be redundant in most cases and seems kind of not the point of the callback!


#2

Yeah, you’re right - I can’t think of a good reason for that to be there. There must have been some bizarre reason why I put it in, but I think chopping that line out is the best plan. I’ll do the same for the next version.


#3