diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvirc/ui/kvi_ircview.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/kvirc/ui/kvi_ircview.cpp b/src/kvirc/ui/kvi_ircview.cpp index 59ae4ba05..1d1df1104 100644 --- a/src/kvirc/ui/kvi_ircview.cpp +++ b/src/kvirc/ui/kvi_ircview.cpp @@ -1508,7 +1508,19 @@ no_selection_paint: iLinesPerPage++; } - if(pCurTextLine && iLinesPerPage > 0 && iLinesPerPage != m_pScrollBar->pageStep()) + /* REMINDER + * Try to get the current number of KviIrcViewLines from the paintEvent and set the m_pScrollBar's + * pageStep accordingly; the calculated value is valid only: + * if there are enough lines to fill up at least a page (pCurTextLine) + * if the value is safe (iLinesPerPage > 0) + * if it's different from the actual one (iLinesPerPage != m_pScrollBar->pageStep()) + * only on full repaints: rectHeight == rect().height() + */ + if(pCurTextLine && + iLinesPerPage > 0 && + iLinesPerPage != m_pScrollBar->pageStep() && + rectHeight == rect().height() + ) m_pScrollBar->setPageStep(iLinesPerPage); if(!bLineMarkPainted && pCurTextLine && (rectTop <= (KVI_IRCVIEW_VERTICAL_BORDER + 5))) |
