Revision  5c8fa20 
<https://github.com/leo-editor/leo-editor/commit/5c8fa206c7e33a0f3e6addf843a4639384fd3f73>
 
contains fix. 

This is a perfect example of the initialization mess. From the traceback it 
is clearly that this exception was raised during load of settings. It is 
not possible that user started to edit headline in this stage. And yet 
endEdit is called. Yes, I know this call is made most likely just to make 
sure. But because of this redundant, *just to make sure *call it is 
necessary to put some extra guards in the code that would otherwise work 
without it. And those guards must exist in lots of places just because we 
are reusing same code in initialization as in normal running state.

Instead initialization code should be kept free and clean of any gui calls. 
Either writeFromString must not call gui methods like endEditing, either 
reload_settings, init_env in abbrevCommands must not call writeFromString.

Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to