aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Fabio Bas2010-12-18 17:23:14 +0000
committerGravatar Fabio Bas2010-12-18 17:23:14 +0000
commitab582faf192e3840d84c9dda452dc5838c4d1f99 (patch)
tree81c0c8067e31a8357c22c602c538a4a7b6e7d338
parentmade the "CONSOLE" caption translatable; updated *po; thanks egns (diff)
downloadKVIrc-ab582faf192e3840d84c9dda452dc5838c4d1f99.tar.gz
KVIrc-ab582faf192e3840d84c9dda452dc5838c4d1f99.tar.bz2
KVIrc-ab582faf192e3840d84c9dda452dc5838c4d1f99.zip
fix for #1050
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5204 17fca916-40b9-46aa-a4ea-0a15b648b75c
-rw-r--r--src/kvirc/ui/kvi_ircview.cpp14
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)))