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

This commit is contained in:
Michael Liebmann
2013-03-20 21:43:23 +01:00
parent c117c80579
commit c74fb77603

View File

@@ -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();
}