avoids invalidating when the text doesn't change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20210 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d436e544a4
commit
695174cbdd
@ -82,6 +82,9 @@ BStringView::~BStringView()
|
||||
void
|
||||
BStringView::SetText(const char* text)
|
||||
{
|
||||
if ((text && fText && !strcmp(text, fText))
|
||||
|| (!text && !fText))
|
||||
return;
|
||||
free(fText);
|
||||
fText = text ? strdup(text) : NULL;
|
||||
Invalidate();
|
||||
|
Loading…
Reference in New Issue
Block a user