Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2009, 9:42:16 PM (15 years ago)
Author:
rgrieder
Message:

Fixed output problem in Shell (non complete line output was not processed correctly).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/Shell.cc

    r6243 r6364  
    197197        {
    198198            this->outputLines_.push_front(std::make_pair(lines[i], type));
    199             this->updateListeners<&ShellListener::lineAdded>();
     199
     200            if (this->scrollPosition_)
     201                this->scrollPosition_++;
     202            else
     203                this->scrollIterator_ = this->outputLines_.begin();
     204
     205            this->bFinishedLastLine_ = true;
     206            if (!this->scrollPosition_)
     207                this->updateListeners<&ShellListener::lineAdded>();
    200208        }
    201209    }
     
    261269
    262270            if (this->bFinishedLastLine_)
    263             {
    264                 this->outputLines_.push_front(std::make_pair(output, static_cast<LineType>(level)));
    265 
    266                 if (this->scrollPosition_)
    267                     this->scrollPosition_++;
    268                 else
    269                     this->scrollIterator_ = this->outputLines_.begin();
    270 
    271                 this->bFinishedLastLine_ = newline;
    272 
    273                 if (!this->scrollPosition_)
    274                 {
    275                     this->updateListeners<&ShellListener::lineAdded>();
    276                 }
    277             }
     271                this->addOutputLine(output, static_cast<LineType>(level));
    278272            else
    279273            {
    280274                this->outputLines_.front().first += output;
    281                 this->bFinishedLastLine_ = newline;
    282275                this->updateListeners<&ShellListener::onlyLastLineChanged>();
    283276            }
     277            this->bFinishedLastLine_ = newline;
    284278
    285279        } while (newline);
Note: See TracChangeset for help on using the changeset viewer.