[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevplatform/plugins/standardoutputview
From: David Nolden <david.nolden.kde () art-master ! de>
Date: 2009-02-12 0:02:33
Message-ID: 1234396953.385130.13634.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 924961 by zwabel:
- Set the scroll-mode to scroll-per-item. This might be the trick to finally make the \
output-view behave well when it contains many items.
- Scroll immediately when new data arrives
M +8 -2 outputwidget.cpp
--- trunk/KDE/kdevplatform/plugins/standardoutputview/outputwidget.cpp #924960:924961
@@ -310,6 +310,7 @@
listview->setViewMode( QListView::ListMode );
listview->setMovement( QListView::Static );
listview->setResizeMode( QListView::Fixed );
+ listview->setVerticalScrollMode(QAbstractItemView::ScrollPerItem);
views[id] = listview;
connect( listview, SIGNAL(activated(const QModelIndex&)),
this, SLOT(activate(const QModelIndex&)));
@@ -408,7 +409,7 @@
void OutputWidget::scrollToBottom( int id )
{
- if( views.contains( id ) && views.value( id )->verticalScrollBar()->value() == \
views.value( id )->verticalScrollBar()->maximum() ) +/* if( views.contains( id ) \
&& views.value( id )->verticalScrollBar()->value() == views.value( id \
)->verticalScrollBar()->maximum() ) {
kDebug() << "starting auto-scroll timer";
if (!scrollTimers.contains(id)) {
@@ -422,7 +423,12 @@
if (!scrollTimers[id]->isActive())
// 100ms delay in scrolling, for performance reasons
scrollTimers[id]->start(100);
- }
+ }*/
+ QWidget* w = currentWidget();
+ if( !w )
+ return;
+ QAbstractItemView *view = dynamic_cast<QAbstractItemView*>(w);
+ view->scrollToBottom();
}
void OutputWidget::doScrollToBottom( int id )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic