summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llchatentry.cpp3
-rw-r--r--indra/llui/llchatentry.h2
-rw-r--r--indra/llui/lltextbase.cpp6
-rw-r--r--indra/llui/lltextbase.h2
4 files changed, 7 insertions, 6 deletions
diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp
index 38e2a8106a..8e9c6555c3 100644
--- a/indra/llui/llchatentry.cpp
+++ b/indra/llui/llchatentry.cpp
@@ -146,10 +146,11 @@ void LLChatEntry::beforeValueChange()
void LLChatEntry::onValueChange(S32 start, S32 end)
{
+ //Internally resetLabel() must meet a condition before it can reset the label
resetLabel();
}
-BOOL LLChatEntry::useLabel()
+bool LLChatEntry::useLabel()
{
return !getLength() && !mLabel.empty();
}
diff --git a/indra/llui/llchatentry.h b/indra/llui/llchatentry.h
index 1f3fcf8945..49181c8d78 100644
--- a/indra/llui/llchatentry.h
+++ b/indra/llui/llchatentry.h
@@ -56,7 +56,7 @@ protected:
LLChatEntry(const Params& p);
/*virtual*/ void beforeValueChange();
/*virtual*/ void onValueChange(S32 start, S32 end);
- /*virtual*/ BOOL useLabel();
+ /*virtual*/ bool useLabel();
public:
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 15856ae4ef..b827acb185 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -535,7 +535,7 @@ void LLTextBase::drawText()
{
return;
}
- else if (useLabel() == TRUE)
+ else if (useLabel())
{
text_len = mLabel.getWString().length();
}
@@ -2059,7 +2059,7 @@ BOOL LLTextBase::setLabelArg(const std::string& key, const LLStringExplicit& tex
void LLTextBase::resetLabel()
{
- if (useLabel() == TRUE)
+ if (useLabel())
{
clearSegments();
@@ -2072,7 +2072,7 @@ void LLTextBase::resetLabel()
}
}
-BOOL LLTextBase::useLabel()
+bool LLTextBase::useLabel()
{
return !getLength() && !mLabel.empty() && !hasFocus();
}
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 44b149d264..629b304b25 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -503,7 +503,7 @@ protected:
void initFromParams(const Params& p);
virtual void beforeValueChange();
virtual void onValueChange(S32 start, S32 end);
- virtual BOOL useLabel();
+ virtual bool useLabel();
// draw methods
void drawSelectionBackground(); // draws the black box behind the selected text