diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-02 17:42:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-02 17:45:21 +0000 |
commit | 378c74ce290ab772f962db51ff8cba200cb40144 (patch) | |
tree | 605ffe13ee1340308c06ffb60cd93d15ad9a6cc0 | |
parent | a6c853724206b78026d0a9aac70060875a12cd54 (diff) |
Only call super-expensive Invalidate on scrollbar toggling
otherwise even using backspace in an annotated area will cause super slow
behaviour as each keystroke causes a full page render
This became a problem after
commit 0761f81643a6890457e9ef7d913ab5c88c2593a4
Date: Thu Dec 19 18:50:58 2013 +0000
123792: complete annotations on text ranges feature
but underlying problem was always there ready to trigger.
For this case only render the full page if the state
of comments scrollbars *toggles*, i.e. if there wasn't
scrollbars and there ends up still with no scrollbars
avoid the (bad) hack of invalidating the page
Change-Id: Ic7fd432d2317b0f5ad8d8773636f99fe75d660d6
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 7af692705115..b97b1863a2ec 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -767,7 +767,8 @@ void SwPostItMgr::LayoutPostIts() } else { - bUpdate = true; + if (mPages[n]->bScrollbar) + bUpdate = true; mPages[n]->bScrollbar = false; } } @@ -803,7 +804,7 @@ void SwPostItMgr::LayoutPostIts() // notes scrollbar is otherwise not drawn correctly for some cases // scrollbar area is enough if (bUpdate) - mpEditWin->Invalidate(); + mpEditWin->Invalidate(); /*This is a super expensive relayout and render of the entire page*/ mbLayouting = false; } |