Summary: | Horizontal scrollbar and view not synced, if dynamic and static word wrap are off | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Dominik Haumann <dhaumann> |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Dominik Haumann
2006-06-26 17:39:09 UTC
SVN commit 555177 by kling: Relocate view to leftmost column when disabling the horizontal scrollbar. BUG: 129853 M +6 -2 kateviewinternal.cpp M +0 -1 kateviewinternal.h --- branches/KDE/3.5/kdelibs/kate/part/kateviewinternal.cpp #555176:555177 @@ -141,7 +141,6 @@ m_columnScroll->setTracking(true); m_startX = 0; - m_oldStartX = 0; connect( m_columnScroll, SIGNAL( valueChanged (int) ), this, SLOT( scrollColumns (int) ) ); @@ -455,7 +454,6 @@ x = 0; int dx = m_startX - x; - m_oldStartX = m_startX; m_startX = x; if (QABS(dx) < width()) @@ -689,6 +687,12 @@ if (max < 0) max = 0; + // if we lose the ability to scroll horizontally, move view to the far-left + if (max == 0) + { + m_startX = 0; + } + // disable scrollbar m_columnScroll->setDisabled (max == 0); --- branches/KDE/3.5/kdelibs/kate/part/kateviewinternal.h #555176:555177 @@ -268,7 +268,6 @@ // QScrollBar *m_columnScroll; int m_startX; - int m_oldStartX; // has selection changed while your mouse or shift key is pressed bool m_selChangedByUser; SVN commit 555181 by kling: Forward-port of SVN commit 555177 by kling: Relocate view to leftmost column when disabling the horizontal scrollbar. CCBUG: 129853 M +6 -2 kateviewinternal.cpp M +0 -1 kateviewinternal.h --- trunk/KDE/kdelibs/kate/part/kateviewinternal.cpp #555180:555181 @@ -159,7 +159,6 @@ m_columnScroll->setTracking(true); m_startX = 0; - m_oldStartX = 0; connect(m_columnScroll, SIGNAL(valueChanged(int)), SLOT(scrollColumns(int))); @@ -505,7 +504,6 @@ x = 0; int dx = m_startX - x; - m_oldStartX = m_startX; m_startX = x; if (qAbs(dx) < width()) @@ -553,6 +551,12 @@ if (max < 0) max = 0; + // if we lose the ability to scroll horizontally, move view to the far-left + if (max == 0) + { + m_startX = 0; + } + // disable scrollbar m_columnScroll->setDisabled (max == 0); --- trunk/KDE/kdelibs/kate/part/kateviewinternal.h #555180:555181 @@ -294,7 +294,6 @@ // QScrollBar *m_columnScroll; int m_startX; - int m_oldStartX; // has selection changed while your mouse or shift key is pressed bool m_selChangedByUser; |