Canceling an input method now removes the complete inline from the text.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19118 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-10-25 12:25:41 +00:00
parent d32e5bae5e
commit f0cd9e9d87
+7
View File
@@ -4443,6 +4443,13 @@ BTextView::CancelInputMethod()
message.AddInt32("be:opcode", B_INPUT_METHOD_STOPPED); message.AddInt32("be:opcode", B_INPUT_METHOD_STOPPED);
fInline->Method()->SendMessage(&message); fInline->Method()->SendMessage(&message);
// Delete the previously inserted text (if any)
if (fInline->IsActive()) {
int32 oldOffset = fInline->Offset();
DeleteText(oldOffset, oldOffset + fInline->Length());
fClickOffset = fSelStart = fSelEnd = oldOffset;
}
delete fInline; delete fInline;
fInline = NULL; fInline = NULL;