On 29.10.2016 22:17, racoon wrote:
On 29.10.2016 10:33, racoon wrote:
I am working on a patch for
http://www.lyx.org/trac/ticket/10455
Seemed to me like a good suggestion. Attached is a not yet working patch.
Unfortunately, I have no idea in which header to define the new
currentZoom variable. Any recommendations?
- It will be saved via QSettings (highest hirachy). The alternative to
save it to the preferences does not seem right since preferences are
normally only saved when the settings are manually saved. However, the
currentZoom should be saved whenever LyX is quit.
- Basically this variable is needed everywhere where now there is
lyxrc.zoom except for the preferences itself (and a new LFUN which
resets currentZoom to the default lyxrc.zoom). That is why still putting
it in LyXRC.h is tempting. This is what I did in the patch and what
seems to break it. Probably since the variable is somehow reset when
loading the preferences which happens after the currentZoom is loaded
via QSettings?
Here is an updated version that fixes the bug and makes the default zoom
accessible via binding M+0.
QSettings save and restore does not work properly yet. (Due to the
problem mentioned in my last post.)
Okay, I got it to work:
http://www.lyx.org/trac/ticket/10455#comment:1
Daniel