summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-29 15:53:28 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-29 15:59:40 -0400
commit391a57ef65687f2e373bac8d410e551aafa780ec (patch)
tree9e0b13b44d431eafff02ec8ba75bc270617c0714
parent0d5b9f1ad4b132d8d0cc22af1f524f971c0166db (diff)
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
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
-rw-r--r--sc/source/ui/view/tabview4.cxx2
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();
}
}