]> 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)
committerRichard Heck <rgheck@lyx.org>
Wed, 15 Jun 2016 21:32:53 +0000 (22:32 +0100)
commitb90435ac725a878e42e939a4f7b4006180d4abd6
treed18a502004b25a613b4f3bdc0f3168db2382f1e0
parent009dc75fef382738acdf00a2a749293f56a125eb
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