mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-09 00:05:52 -04:00
use 'close' on last tab of message log viewer to clear it
This commit is contained in:
parent
906259b2f7
commit
ab859c9bdf
@ -71,7 +71,6 @@ void QgsMessageLogViewer::logMessage( const QString &message, const QString &tag
|
|||||||
w->setReadOnly( true );
|
w->setReadOnly( true );
|
||||||
tabWidget->addTab( w, cleanedTag );
|
tabWidget->addTab( w, cleanedTag );
|
||||||
tabWidget->setCurrentIndex( tabWidget->count() - 1 );
|
tabWidget->setCurrentIndex( tabWidget->count() - 1 );
|
||||||
tabWidget->setTabsClosable( true );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString levelString;
|
QString levelString;
|
||||||
@ -101,6 +100,8 @@ void QgsMessageLogViewer::logMessage( const QString &message, const QString &tag
|
|||||||
|
|
||||||
void QgsMessageLogViewer::closeTab( int index )
|
void QgsMessageLogViewer::closeTab( int index )
|
||||||
{
|
{
|
||||||
tabWidget->removeTab( index );
|
if ( tabWidget->count() == 1 )
|
||||||
tabWidget->setTabsClosable( tabWidget->count() > 1 );
|
qobject_cast<QPlainTextEdit *>( tabWidget->widget( 0 ) )->clear();
|
||||||
|
else
|
||||||
|
tabWidget->removeTab( index );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user