Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5785 in orxonox.OLD


Ignore:
Timestamp:
Nov 26, 2005, 9:01:27 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: history ok again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_input.cc

    r5784 r5785  
    246246    this->history.push_back(currentText);
    247247    this->historyScrolling = true;
    248     this->historyIT = this->history.end();
    249   }
    250 
    251   char* prevElem = *(this->historyIT--);
    252   if (prevElem == NULL)
    253     return;
    254   else
    255   {
    256     this->flush();
    257     this->setInputText(prevElem);
     248    this->historyIT = --this->history.end();
     249  }
     250
     251  if(this->historyIT != this->history.begin())
     252  {
     253    char* prevElem = *(--this->historyIT);
     254    if (prevElem == NULL)
     255      return;
     256    else
     257    {
     258      this->flush();
     259      this->setInputText(prevElem);
     260    }
    258261  }
    259262}
     
    266269  if (!this->historyScrolling)
    267270    return;
    268   char* nextElem = *(this->historyIT++);
    269   if (nextElem == NULL)
    270     return;
    271   else
    272   {
    273     this->flush();
    274     this->setInputText(nextElem);
     271  if (this->historyIT != this->history.end())
     272  {
     273    char* nextElem = *(++this->historyIT);
     274    if (nextElem == NULL)
     275      return;
     276    else
     277    {
     278      this->flush();
     279      this->setInputText(nextElem);
     280    }
    275281  }
    276282}
Note: See TracChangeset for help on using the changeset viewer.