summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloatertwitter.cpp11
-rw-r--r--indra/newview/llfloatertwitter.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp
index 6f8ad109c6..06d0fb5542 100644
--- a/indra/newview/llfloatertwitter.cpp
+++ b/indra/newview/llfloatertwitter.cpp
@@ -119,9 +119,18 @@ void LLTwitterPhotoPanel::draw()
{
int max_status_length = add_photo ? 100 : 140;
status_text_box->setMaxTextLength(max_status_length);
+ if (!add_photo)
+ {
+ if (mOldStatusText.length() > status_text_box->getText().length() && status_text_box->getText() == mOldStatusText.substr(0, status_text_box->getText().length()))
+ {
+ status_text_box->setText(mOldStatusText);
+ }
+ mOldStatusText = "";
+ }
if (status_text_box->getText().length() > max_status_length)
{
- status_text_box->setText(status_text_box->getText().substr(0, max_status_length));
+ mOldStatusText = status_text_box->getText();
+ status_text_box->setText(mOldStatusText.substr(0, max_status_length));
}
}
diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h
index 12e1d41210..686e167b1f 100644
--- a/indra/newview/llfloatertwitter.h
+++ b/indra/newview/llfloatertwitter.h
@@ -70,6 +70,8 @@ private:
LLUICtrl * mPhotoCheckbox;
LLUICtrl * mPostButton;
LLUICtrl* mCancelButton;
+
+ std::string mOldStatusText;
};
class LLTwitterAccountPanel : public LLPanel