sc/source/ui/app/inputwin.cxx | 15 +++++++++++---- sc/source/ui/inc/inputwin.hxx | 1 + 2 files changed, 12 insertions(+), 4 deletions(-)
New commits: commit 4fa27dfc0e67adb298bbb412657958908433d547 Author: Noel Power <noel.po...@novell.com> Date: Tue Jan 24 11:14:38 2012 +0000 fix ( hopefully ) viewing artifacts in input line fdo#44391 Signed-off-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 1793fae..37caced 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1125,7 +1125,8 @@ ScMultiTextWnd::ScMultiTextWnd( ScInputBarGroup* pParen, ScTabViewShell* pViewSh ScTextWnd( pParen, pViewSh ), mrGroupBar(* pParen ), mnLines( 1 ), - mnLastExpandedLines( INPUTWIN_MULTILINES ) + mnLastExpandedLines( INPUTWIN_MULTILINES ), + mbInvalidate( false ) { nTextStartPos = TEXT_MULTI_STARTPOS; } @@ -1138,7 +1139,14 @@ void ScMultiTextWnd::Paint( const Rectangle& rRec ) { EditView* pView = GetEditView(); if ( pView ) - pView->Paint( rRec ); + { + if ( mbInvalidate ) + { + pView->Invalidate(); + mbInvalidate = false; + } + pEditView->Paint( rRec ); + } } EditView* ScMultiTextWnd::GetEditView() @@ -1403,8 +1411,7 @@ void ScMultiTextWnd::SetTextString( const String& rNewString ) // inputbar window scrolled to the bottom if we do that here ( because the tableview and topview // are synced I guess ). // should fix that I suppose :-/ need to look a bit further into that - if ( pEditView ) - pEditView->Invalidate(); + mbInvalidate = true; // ensure next Paint ( that uses editengine ) call will call Invalidate first ScTextWnd::SetTextString( rNewString ); SetScrollBarRange(); DoScroll(); diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 7b5bc28..eec7fed 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -204,6 +204,7 @@ private: ScInputBarGroup& mrGroupBar; long mnLines; long mnLastExpandedLines; + bool mbInvalidate; }; class ScInputBarGroup : public ScTextWndBase _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits