Skip to content

Commit

Permalink
improve message log resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 7, 2012
1 parent d012589 commit 173e9ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsmessagelogviewer.cpp
Expand Up @@ -132,7 +132,6 @@ void QgsMessageLogViewer::logMessage( QString message, QString tag, int level )
w->setGridStyle( Qt::DotLine );
w->setEditTriggers( QAbstractItemView::NoEditTriggers );
w->setHorizontalHeaderLabels( QStringList() << tr( "Timestamp" ) << tr( "Message" ) << tr( "Level" ) );
w->horizontalHeader()->setResizeMode( QHeaderView::ResizeToContents );
tabWidget->addTab( w, tag );

tabWidget->setCurrentIndex( tabWidget->count() - 1 );
Expand All @@ -146,6 +145,8 @@ void QgsMessageLogViewer::logMessage( QString message, QString tag, int level )
w->setItem( n, 1, new QTableWidgetItem( message ) );
w->setItem( n, 2, new QTableWidgetItem( QString::number( level ) ) );
w->scrollToBottom();

w->horizontalHeader()->resizeSections( QHeaderView::ResizeToContents );
}

void QgsMessageLogViewer::closeTab( int index )
Expand Down

0 comments on commit 173e9ad

Please sign in to comment.