[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/apps/konsole/src
From:       Robert Knight <robertknight () gmail ! com>
Date:       2008-03-31 21:18:31
Message-ID: 1206998311.815157.4533.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 792354 by knight:

Fix terminal display jumping to bottom of screen when trying to scroll up with the \
scrollbar already at the top.  Spotted by Matthew Woehlke.


 M  +2 -8      TerminalDisplay.cpp  
 M  +0 -3      TerminalDisplay.h  


--- trunk/KDE/kdebase/apps/konsole/src/TerminalDisplay.cpp #792353:792354
@@ -2123,13 +2123,6 @@
                      SLOT(tripleClickTimeout()));
 }
 
-bool TerminalDisplay::canScroll() const
-{
-	bool sliderAtTop = _scrollBar->value() == 0;
-	bool sliderAtBottom = _scrollBar->value() + _scrollBar->pageStep() >= \
                _scrollBar->maximum();
-
-	return !(sliderAtTop && sliderAtBottom);
-}
 void TerminalDisplay::wheelEvent( QWheelEvent* ev )
 {
   if (ev->orientation() != Qt::Vertical)
@@ -2141,7 +2134,8 @@
   // for the benefit of programs such as 'less'
   if ( _mouseMarks )
   {
-  	if (canScroll())
+	bool canScroll = _scrollBar->maximum() > 0;
+  	if (canScroll)
     	_scrollBar->event(ev);
 	else
 	{
--- trunk/KDE/kdebase/apps/konsole/src/TerminalDisplay.h #792353:792354
@@ -649,9 +649,6 @@
 	// redraws the cursor
 	void updateCursor();
 
-	// returns true if the scroll bar thumb could be moved
-	bool canScroll() const;
-
     // the window onto the terminal screen which this display
     // is currently showing.  
     QPointer<ScreenWindow> _screenWindow;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic