Closed giordano closed 5 years ago
I added the improvements suggested by Anastasis (slightly changed, but the bulk was good, thanks a lot!), I only need to add some tests :see_no_evil:
I think this is good for review now. I added a few tests, that are eventually passing on Travis (after several restarts :roll_eyes:)
Also we can add a separator in the Window menu between the hide/show options and the toggling options.
Found a small logic inconsistency:
If you try to open the arabic.atf file again, it will work fine. It just doesn't seem to work when opening from arabic toggle mode.
Same happens when opening from another toggle mode, so this problem is not only particular to arabic toggle.
I think I addressed all comments.
Regarding the last one, my solution has been to add a force
argument to NammuController.arabic
and call arabic(force=True)
when opening an Arabic file, see https://github.com/oracc/nammu/pull/384/commits/43aa2caec405c81a38aaa3da783358236ee42d21#diff-2bd150ec3e0b82e145346223be946f73. I couldn't find any reliable control for fixing this.
I find the whole toggling mechanism a bit perverse as it involves non-mutual-exclusive features to be toggled. Now there are functions to just do the thing (like atfAreaView.setup_edit_area_split
and atfAreaView.setup_edit_area_no_split
), and there are some checks before actually toggling, instead of blindly toggling whatever it was before.
Fix #353