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 8, 2012
1 parent c09cc7f commit d8b081e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsmessagelogviewer.cpp
Original file line number Diff line number Diff line change
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 d8b081e

Please sign in to comment.