HaikuDepot: TextSpan fixes for sometimes neglected fCharCount.
This commit is contained in:
@@ -37,6 +37,7 @@ TextSpan&
|
|||||||
TextSpan::operator=(const TextSpan& other)
|
TextSpan::operator=(const TextSpan& other)
|
||||||
{
|
{
|
||||||
fText = other.fText;
|
fText = other.fText;
|
||||||
|
fCharCount = other.fCharCount;
|
||||||
fStyle = other.fStyle;
|
fStyle = other.fStyle;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
@@ -46,8 +47,9 @@ TextSpan::operator=(const TextSpan& other)
|
|||||||
bool
|
bool
|
||||||
TextSpan::operator==(const TextSpan& other) const
|
TextSpan::operator==(const TextSpan& other) const
|
||||||
{
|
{
|
||||||
return fText == other.fText
|
return fCharCount == other.fCharCount
|
||||||
&& fStyle == other.fStyle;
|
&& fStyle == other.fStyle
|
||||||
|
&& fText == other.fText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -62,6 +64,7 @@ void
|
|||||||
TextSpan::SetText(const BString& text)
|
TextSpan::SetText(const BString& text)
|
||||||
{
|
{
|
||||||
fText = text;
|
fText = text;
|
||||||
|
fCharCount = fText.CountChars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user