[Orxonox-commit 1646] r6364 - code/branches/presentation2/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Wed Dec 16 21:42:16 CET 2009
Author: rgrieder
Date: 2009-12-16 21:42:16 +0100 (Wed, 16 Dec 2009)
New Revision: 6364
Modified:
code/branches/presentation2/src/libraries/core/Shell.cc
Log:
Fixed output problem in Shell (non complete line output was not processed correctly).
Modified: code/branches/presentation2/src/libraries/core/Shell.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Shell.cc 2009-12-16 20:41:33 UTC (rev 6363)
+++ code/branches/presentation2/src/libraries/core/Shell.cc 2009-12-16 20:42:16 UTC (rev 6364)
@@ -196,7 +196,15 @@
for (unsigned i = 0; i < lines.size(); ++i)
{
this->outputLines_.push_front(std::make_pair(lines[i], type));
- this->updateListeners<&ShellListener::lineAdded>();
+
+ if (this->scrollPosition_)
+ this->scrollPosition_++;
+ else
+ this->scrollIterator_ = this->outputLines_.begin();
+
+ this->bFinishedLastLine_ = true;
+ if (!this->scrollPosition_)
+ this->updateListeners<&ShellListener::lineAdded>();
}
}
@@ -260,27 +268,13 @@
break;
if (this->bFinishedLastLine_)
- {
- this->outputLines_.push_front(std::make_pair(output, static_cast<LineType>(level)));
-
- if (this->scrollPosition_)
- this->scrollPosition_++;
- else
- this->scrollIterator_ = this->outputLines_.begin();
-
- this->bFinishedLastLine_ = newline;
-
- if (!this->scrollPosition_)
- {
- this->updateListeners<&ShellListener::lineAdded>();
- }
- }
+ this->addOutputLine(output, static_cast<LineType>(level));
else
{
this->outputLines_.front().first += output;
- this->bFinishedLastLine_ = newline;
this->updateListeners<&ShellListener::onlyLastLineChanged>();
}
+ this->bFinishedLastLine_ = newline;
} while (newline);
}
More information about the Orxonox-commit
mailing list