Commit 61bfeff6 authored by Dirk Wilden's avatar Dirk Wilden

speeeeeeed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8405 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fe58e470
......@@ -167,9 +167,11 @@ void LoggerWidget::scrollTo(int _pos){
/// Append a new logmessage to log viewer
void LoggerWidget::append(QString _text, Logtype _type){
QTime time;
time.start();
list_->addItem(_text);
QListWidgetItem* item = list_->item( list_->count()-1 );
if ( allButton_->isChecked() )
......@@ -203,8 +205,10 @@ void LoggerWidget::append(QString _text, Logtype _type){
item->setHidden(false);
break;
}
list_->scrollToBottom();
if ( !isHidden() )
list_->scrollToBottom();
}
//-------------------------------------------------------------------------------------
......@@ -240,6 +244,11 @@ void LoggerWidget::updateList(){
list_->scrollToBottom();
}
//-------------------------------------------------------------------------------------
void LoggerWidget::showEvent ( QShowEvent * event ) {
list_->scrollToBottom();
}
//-------------------------------------------------------------------------------------
/// handle keyPressEvents
......
......@@ -81,6 +81,12 @@ class LoggerWidget : public QWidget
* This function shows the context menu
*/
void contextMenuEvent ( QContextMenuEvent * event );
/** \brief Called when the widget is shown
*
* Function scrolls to bottom if the object gets visible
*/
void showEvent ( QShowEvent * event );
private:
......
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