BTextControl::SetValue():

* IsFocus() always returns false, use the textview instead.
* Use SelectAll on the textview, when it has the focus (like in MakeFocus()). This fixes bug #6703.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38900 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2010-10-08 21:05:05 +00:00
parent 39eb6571be
commit 5b349aa267
+3 -1
View File
@@ -310,8 +310,10 @@ BTextControl::SetText(const char *text)
fText->SetText(text);
if (IsFocus())
if (fText->IsFocus()) {
fText->SetInitialText();
fText->SelectAll();
}
fText->Invalidate();
}