From 695174cbddded8cbad1e9155613351d85abc06e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Fri, 23 Feb 2007 20:04:57 +0000 Subject: [PATCH] avoids invalidating when the text doesn't change git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20210 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/StringView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/interface/StringView.cpp b/src/kits/interface/StringView.cpp index 8f7bfab73b..d85c2f1219 100644 --- a/src/kits/interface/StringView.cpp +++ b/src/kits/interface/StringView.cpp @@ -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();