Browse Source

initial string before appending

master
Odilitime 5 years ago
parent
commit
c9ce29c95d
  1. 4
      src/TextBlock.cpp

4
src/TextBlock.cpp

@ -140,12 +140,12 @@ size_t TextBlock::setValue(std::string value) { @@ -140,12 +140,12 @@ size_t TextBlock::setValue(std::string value) {
}
std::string TextBlock::getValue() {
std::string value;
std::string value = "";
for(auto s : this->lines) {
value += s + '\r';
}
//std::cout << "TextBlock::getValue before strip[" << !this->trailingNewline << "] [" << value << "] lines[" << this->lines.size() << "]" << std::endl;
if (!this->trailingNewline) {
if (!this->trailingNewline && this->lines.size()) {
value.pop_back();
}
return value;

Loading…
Cancel
Save