From 391a57ef65687f2e373bac8d410e551aafa780ec Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 29 Aug 2013 15:53:28 -0400 Subject: Update visible ranges when updating the scroll bars. That seems like the right place to update visible ranges, rather than right before drawing the grid pane. Change-Id: I230bfa753fca7bcd040bd55dba16dfa613d2e8f0 --- sc/source/ui/view/gridwin4.cxx | 2 -- sc/source/ui/view/tabview4.cxx | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b5c76fdf4b17..621b0f5bea68 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -401,8 +401,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod OSL_ENSURE( ValidCol(nX2) && ValidRow(nY2), "GridWin Draw Bereich zu gross" ); - UpdateVisibleRange(); - if (nX2 < maVisibleRange.mnCol1 || nY2 < maVisibleRange.mnRow1) return; // unsichtbar diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index 8140d51650ed..e8f29a281edc 100644 --- a/sc/source/ui/view/tabview4.cxx +++ b/sc/source/ui/view/tabview4.cxx @@ -439,6 +439,8 @@ void ScTabView::UpdateScrollBars() ScRange aVisible( nPosX, nPosY, nTab, nEndX, nEndY, nTab ); if ( pDoc->SetVisibleSpellRange( aVisible ) ) SC_MOD()->AnythingChanged(); // if visible area has changed + + UpdateVisibleRange(); } } -- cgit