summaryrefslogtreecommitdiff
path: root/vcl/source/control/scrbar.cxx
diff options
context:
space:
mode:
authorStephan Schäfer <ssa@openoffice.org>2002-07-18 11:46:52 +0000
committerStephan Schäfer <ssa@openoffice.org>2002-07-18 11:46:52 +0000
commit3c70d4451e94b575f05356d3d3b73ad2c54a2ac4 (patch)
tree008fc8f39728bd1ce6727de1a3ae12e212db2d54 /vcl/source/control/scrbar.cxx
parentf2e2716eefb714fa4e726c890a13860795403197 (diff)
#101374# SetThumbPos() now calls Scroll() and updates mnDelta
Diffstat (limited to 'vcl/source/control/scrbar.cxx')
-rw-r--r--vcl/source/control/scrbar.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index a4f46b079407..56451294f434 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: scrbar.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: pl $ $Date: 2002-05-08 16:01:30 $
+ * last change: $Author: ssa $ $Date: 2002-07-18 12:46:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -597,13 +597,14 @@ void ScrollBar::ImplDraw( USHORT nDrawFlags )
long ScrollBar::ImplScroll( long nNewPos, BOOL bCallEndScroll )
{
- long nOldPos = mnThumbPos;
+ //long nOldPos = mnThumbPos;
SetThumbPos( nNewPos );
- long nDelta = mnThumbPos-nOldPos;
+ //long nDelta = mnThumbPos-nOldPos;
+ long nDelta = mnDelta;
if ( nDelta )
{
- mnDelta = nDelta;
- Scroll();
+ //mnDelta = nDelta;
+ //Scroll();
if ( bCallEndScroll )
EndScroll();
mnDelta = 0;
@@ -798,10 +799,10 @@ void ScrollBar::Tracking( const TrackingEvent& rTEvt )
// Bei Abbruch, die alte ThumbPosition wieder herstellen
if ( rTEvt.IsTrackingCanceled() )
{
- long nOldPos = mnThumbPos;
+ //long nOldPos = mnThumbPos;
SetThumbPos( mnStartPos );
- mnDelta = mnThumbPos-nOldPos;
- Scroll();
+ //mnDelta = mnThumbPos-nOldPos;
+ //Scroll();
}
if ( meScrollType == SCROLL_DRAG )
@@ -1075,8 +1076,10 @@ void ScrollBar::SetThumbPos( long nNewThumbPos )
if ( mnThumbPos != nNewThumbPos )
{
+ mnDelta = nNewThumbPos - mnThumbPos;
mnThumbPos = nNewThumbPos;
StateChanged( STATE_CHANGE_DATA );
+ Scroll();
}
}