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){ ...@@ -167,9 +167,11 @@ void LoggerWidget::scrollTo(int _pos){
/// Append a new logmessage to log viewer /// Append a new logmessage to log viewer
void LoggerWidget::append(QString _text, Logtype _type){ void LoggerWidget::append(QString _text, Logtype _type){
QTime time;
time.start();
list_->addItem(_text); list_->addItem(_text);
QListWidgetItem* item = list_->item( list_->count()-1 ); QListWidgetItem* item = list_->item( list_->count()-1 );
if ( allButton_->isChecked() ) if ( allButton_->isChecked() )
...@@ -203,8 +205,10 @@ void LoggerWidget::append(QString _text, Logtype _type){ ...@@ -203,8 +205,10 @@ void LoggerWidget::append(QString _text, Logtype _type){
item->setHidden(false); item->setHidden(false);
break; break;
} }
list_->scrollToBottom(); if ( !isHidden() )
list_->scrollToBottom();
} }
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
...@@ -240,6 +244,11 @@ void LoggerWidget::updateList(){ ...@@ -240,6 +244,11 @@ void LoggerWidget::updateList(){
list_->scrollToBottom(); list_->scrollToBottom();
} }
//-------------------------------------------------------------------------------------
void LoggerWidget::showEvent ( QShowEvent * event ) {
list_->scrollToBottom();
}
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
/// handle keyPressEvents /// handle keyPressEvents
......
...@@ -81,6 +81,12 @@ class LoggerWidget : public QWidget ...@@ -81,6 +81,12 @@ class LoggerWidget : public QWidget
* This function shows the context menu * This function shows the context menu
*/ */
void contextMenuEvent ( QContextMenuEvent * event ); 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: 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