]> git.lyx.org Git - features.git/commit
TocWidget: clean-up the timer logic
authorGuillaume Munch <gm@lyx.org>
Fri, 29 Apr 2016 21:48:53 +0000 (22:48 +0100)
committerGuillaume Munch <gm@lyx.org>
Tue, 3 May 2016 16:20:58 +0000 (17:20 +0100)
commit5bfdaef9806426c51981ed0d4c03f6833d80b6ee
treef912f7fd77fe4f647c40da585a68b4189c93e727
parent90c8b0697f693df67f5746d31ce78bb3eee1a164
TocWidget: clean-up the timer logic

The timer logic introduced to solve bug #7138 was not entirely reliable; in
particular it resulted in spurious updates (noticeable by the treeview
collapsing just after one opens a branch, in particular).

This commit cleans up the timer logic. I followed the original design decision
of having an immediate update followed by a delayed update. Now the updates are
appropriately compressed and done after a delay of 2s (as can be noticed with
the treeview still collapsing, unfortunately, but after a more predictable
delay...).
src/frontends/qt4/GuiToc.cpp
src/frontends/qt4/TocWidget.cpp
src/frontends/qt4/TocWidget.h