]> git.lyx.org Git - features.git/commit
Remove premature (and bad) optimization
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 2 Jan 2019 17:36:02 +0000 (18:36 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:54 +0000 (14:39 +0200)
commitdab9d1e98fd3af1127e1c90d6738d041a85f6a93
treea4f3d3aaadf39a7638358a0c9b4e7775939c084d
parentb7ac2e2723cdba0eab1d552dc87682f1fa1ab6f9
Remove premature (and bad) optimization

When blinking the caret, it looks like a cool idea to only update the
small rectangle containing the caret. Actually it is an awful idea, since
the paint event will paint some rows, and these rows will not be
properly painted outside of the small rectangle. Unfortunately, the
painter will skip those "painted" rows on next paint events.

This leads to painting errors that depend on the ordering of "real"
and "caret" paint events. This is the reason why they only appeared
with split screens.

Quote of the day: ``The real problem is that programmers have spent far
too much time worrying about efficiency in the wrong places and at the
wrong times; premature optimization is the root of all evil (or at
least most of it) in programming.''
-- Donald Knuth, The Art of Computer Programming.

Fixes bug #11354.
src/frontends/qt4/GuiWorkArea.cpp