CTextBox::scrollPageUp/Down: Suppress refresh when there is nothing to scroll

Origin commit data
------------------
Branch: ni/coolstream
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

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2013-03-20 21:43:23 +01:00
parent ed20c5381e
commit 152ddb0683

View File

@@ -554,8 +554,10 @@ void CTextBox::scrollPageDown(const int pages)
{
m_nCurrentPage = m_nNrOfPages - 1;
}
int oldCurrentLine = m_nCurrentLine;
m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage;
refresh();
if (oldCurrentLine != m_nCurrentLine)
refresh();
}
void CTextBox::scrollPageUp(const int pages)
@@ -575,8 +577,10 @@ void CTextBox::scrollPageUp(const int pages)
{
m_nCurrentPage = 0;
}
int oldCurrentLine = m_nCurrentLine;
m_nCurrentLine = m_nCurrentPage * m_nLinesPerPage;
refresh();
if (oldCurrentLine != m_nCurrentLine)
refresh();
}
void CTextBox::refresh(void)