mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
CTextBox::scrollPageUp/Down: Suppress refresh when there is nothing to scroll
Origin commit data
------------------
Commit: c74fb77603
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2013-03-20 (Wed, 20 Mar 2013)
Origin message was:
------------------
* CTextBox::scrollPageUp/Down: Suppress refresh when there is nothing to scroll
This commit is contained in:
@@ -554,7 +554,9 @@ void CTextBox::scrollPageDown(const int pages)
|
||||
{
|
||||
m_nCurrentPage = m_nNrOfPages - 1;
|
||||
}
|
||||
int oldCurrentLine = m_nCurrentLine;
|
||||
m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage;
|
||||
if (oldCurrentLine != m_nCurrentLine)
|
||||
refresh();
|
||||
}
|
||||
|
||||
@@ -575,7 +577,9 @@ void CTextBox::scrollPageUp(const int pages)
|
||||
{
|
||||
m_nCurrentPage = 0;
|
||||
}
|
||||
int oldCurrentLine = m_nCurrentLine;
|
||||
m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage;
|
||||
if (oldCurrentLine != m_nCurrentLine)
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user