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:
Jérôme Duval 2007-02-23 20:04:57 +00:00
parent d436e544a4
commit 695174cbdd

View File

@ -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();