[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_2_BRANCH: kdelibs/kate/part
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2004-03-28 15:26:27
Message-ID: 20040328152627.B686A99B5 () office ! kde ! org
[Download RAW message or body]
CVS commit by dhaumann:
BACKPORT from HEAD:
update vScrollbar of katepart if you make the height smaller +
resize issue regarding to chaning the hight of katepart:
old behaviour:
if cursor is not visible the view got fixed to the first visible line.
if cursor was visible we forced to make it visible after resizing.
NOTE: Actually this did not work properly if you resized fast!
new behaviour:
always fix first visible line while resizing. We don't care anymore whether
the cursor was visible or not.
M +4 -11 kateviewinternal.cpp 1.276.2.6
--- kdelibs/kate/part/kateviewinternal.cpp #1.276.2.5:1.276.2.6
@@ -2551,19 +2551,16 @@ void KateViewInternal::resizeEvent(QResi
bool expandedHorizontally = width() > e->oldSize().width();
bool expandedVertically = height() > e->oldSize().height();
+ bool heightChanged = height() != e->oldSize().height();
m_madeVisible = false;
- if (height() != e->oldSize().height()) {
+ if (heightChanged) {
setAutoCenterLines(m_autoCenterLines, false);
- }
-
- if (height() != e->oldSize().height())
m_cachedMaxStartPos.setPos(-1, -1);
+ }
if (m_view->dynWordWrap()) {
bool dirtied = false;
- int currentViewLine = displayViewLine(displayCursor, true);
-
for (uint i = 0; i < lineRanges.count(); i++) {
// find the first dirty line
@@ -2576,11 +2573,7 @@ void KateViewInternal::resizeEvent(QResi
}
- if (dirtied || expandedVertically) {
+ if (dirtied || heightChanged) {
updateView(true);
leftBorder->update();
-
- // keep the cursor on-screen if it was previously
- if (currentViewLine >= 0)
- makeVisible(displayCursor, displayCursor.col());
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic