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

speeeeeeed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8405 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fe58e470
...@@ -167,6 +167,8 @@ void LoggerWidget::scrollTo(int _pos){ ...@@ -167,6 +167,8 @@ 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);
...@@ -204,7 +206,9 @@ void LoggerWidget::append(QString _text, Logtype _type){ ...@@ -204,7 +206,9 @@ void LoggerWidget::append(QString _text, Logtype _type){
break; break;
} }
if ( !isHidden() )
list_->scrollToBottom(); 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
......
...@@ -82,6 +82,12 @@ class LoggerWidget : public QWidget ...@@ -82,6 +82,12 @@ class LoggerWidget : public QWidget
*/ */
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:
QListWidget* list_; QListWidget* list_;
......
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