(libinterface) Automatically clear text in EnterTextView

This commit is contained in:
Jaidyn Ann 2021-08-18 11:27:14 -05:00
parent b8de54d9bc
commit 42c52b324d

View File

@ -33,8 +33,11 @@ EnterTextView::KeyDown(const char* bytes, int32 numBytes)
if (fTarget != NULL && (bytes[0] == B_ENTER) && (modifiers == 0))
{
BMessage* msg = new BMessage(fMessage);
if (fTextSlot.IsEmpty() == false)
if (fTextSlot.IsEmpty() == false) {
msg->AddString(fTextSlot.String(), Text());
SetText("");
ScrollToOffset(0);
}
fTarget->MessageReceived(msg);
}
else