restores the text controls before using SetValue() since this one uses them

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25103 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2008-04-22 19:13:00 +00:00
parent c2d96d4500
commit d5b26be18c
+4 -4
View File
@@ -76,14 +76,14 @@ BColorControl::_InitData(color_control_layout layout, float size,
fFocusedComponent = 0; fFocusedComponent = 0;
if (archive) { if (archive) {
fRedText = (BTextControl*)FindView("_red");
fGreenText = (BTextControl*)FindView("_green");
fBlueText = (BTextControl*)FindView("_blue");
int32 value = 0; int32 value = 0;
archive->FindInt32("_val", &value); archive->FindInt32("_val", &value);
SetValue(value); SetValue(value);
fRedText = (BTextControl*)FindView("_red");
fGreenText = (BTextControl*)FindView("_green");
fBlueText = (BTextControl*)FindView("_blue");
} else { } else {
BRect rect(0.0f, 0.0f, 70.0f, 15.0f); BRect rect(0.0f, 0.0f, 70.0f, 15.0f);
float labelWidth = StringWidth("Green:") + 5; float labelWidth = StringWidth("Green:") + 5;