Commit bceb0211 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE #228] fixes bug that avoids jumping to the newest entry if an invisible item is added

parent 7823ba2f
......@@ -117,12 +117,19 @@ void WQtMessageDock::addMessage( QString title, QString message, WQtMessagePopup
item->setSizeHint( QSize( 0, w->sizeHint().height() ) );
m_logList->addItem( item );
m_logList->setItemWidget( item, w );
m_logList->scrollToItem( item, QAbstractItemView::PositionAtBottom );
// hide messages not matching the filter
item->setHidden( type < m_filterCombo->currentIndex() );
if( type < m_filterCombo->currentIndex() )
{
item->setHidden( true );
}
else
{
// if visible, jump to item
m_logList->scrollToBottom();
}
// ensure we only have MAXITEMS ite
// ensure we only have MAXITEMS items
if( m_logList->count() > MAXITEMS )
{
// clean up the oldest items
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment