CHUI-958 FIXED Log spam: "drawtext: Ran off Segmentation End" and To field in nearby chat blank when selected

master
maksymsproductengine 2013-05-14 01:30:23 +03:00
parent 5ff0d34ab7
commit 36a51f4927
4 changed files with 20 additions and 2 deletions

View File

@ -163,6 +163,18 @@ bool LLChatEntry::useLabel()
return !getLength() && !mLabel.empty();
}
void LLChatEntry::onFocusReceived()
{
LLUICtrl::onFocusReceived();
updateAllowingLanguageInput();
}
void LLChatEntry::onFocusLost()
{
LLTextEditor::focusLostHelper();
LLUICtrl::onFocusLost();
}
BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask)
{
BOOL handled = FALSE;

View File

@ -62,6 +62,8 @@ public:
virtual void draw();
virtual void onCommit();
/*virtual*/ void onFocusReceived();
/*virtual*/ void onFocusLost();
void enableSingleLineMode(bool single_line_mode);
boost::signals2::connection setTextExpandedCallback(const commit_signal_t::slot_type& cb);

View File

@ -1964,8 +1964,7 @@ void LLTextEditor::onFocusReceived()
updateAllowingLanguageInput();
}
// virtual, from LLView
void LLTextEditor::onFocusLost()
void LLTextEditor::focusLostHelper()
{
updateAllowingLanguageInput();
@ -1982,7 +1981,11 @@ void LLTextEditor::onFocusLost()
// Make sure cursor is shown again
getWindow()->showCursorFromMouseMove();
}
void LLTextEditor::onFocusLost()
{
focusLostHelper();
LLTextBase::onFocusLost();
}

View File

@ -255,6 +255,7 @@ protected:
S32 insert(S32 pos, const LLWString &wstr, bool group_with_next_op, LLTextSegmentPtr segment);
S32 remove(S32 pos, S32 length, bool group_with_next_op);
void focusLostHelper();
void updateAllowingLanguageInput();
BOOL hasPreeditString() const;