Today's work fixed a recent reversion, and made some important progress. 1. The ancient, and extremely annoying scrolling bug appears to have been fixed in a very simple way. The culprit was the setSelectionAreas method. This is supposed to just set the range of selected text. In fact, however, it was causing the body pane to scroll! The solution was to save and restore the YScroll position in setSelectionAreas. This is a simple, understandable, localized fix, and it appears to work completely.
2. This rev restores the "reading settings file" messages, which got dropped out in the recent massive code reorg. It's a bit scary how complicated issuing these messages is--I had to resurrect old code to make sure it works exactly as it did before. 3. This rev encapsulates all the code relating to the Recent Files menu (and .leoRecentFiles.txt). This has had several side effects, including... 4. The commands in the Recent Files menu (sort, clear and clean) now work again. I'm not sure when the commands broke, but I think they may have been broken for quite awhile. 5. Both the local and global configuration classes are now located in leoConfig.py. This makes a lot more sense. The two classes are now called GlobalConfigManager and LocalConfigManager, corresponding to g.app.config and c.config. Here is the checking log. QQQQQ leoApp.py: - Restored the messages about reading settings files. - Created the RecentFilesManager class. This class manages a *global* recent files list. Gone are c.recentFiles and g.app.recentFiles. This class has happy effects in many places. leoCommand.py: - moved configSettings class to leoConfig.py, & renamed it LocalConfigManager. leoConfig.py: - Renamed configClass to GlobalConfigManager. leoFrame.py: - Fixed the horrible scroll bug by saving/restoring the YScroll pos in setSelectionAreas. Clearly, merely changing the selection should *never* alter the scrolling! Hooray! leoGlobals.py: - Added trace_see trace. leoMenu.py - Removed the recentFilesStatic list into the RecentFilesManager. It was also simplified, but that is another story. - menu.createRecentFilesMenu now just calls rc.createRecentFilesMenu. - Simplified menu.deleteRecentFilesMenuItems by using rc helpers. qtGui.py: - Added useful scrolling-related traces. QQQQQ Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
