Tracker: Redirect B_DELETE to BTextView if focused on one
Fixes #19404 a regression from hrev58560. Change-Id: Iea6df69e04f5dccb8f91be506b5b7f85686c5eb1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8947 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Axel Dörfler <[email protected]>
This commit is contained in:
committed by
Axel Dörfler
parent
a502215d78
commit
e4ef7b6075
@@ -2420,8 +2420,19 @@ BPoseView::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kMoveSelectionToTrash:
|
case kMoveSelectionToTrash:
|
||||||
DoMoveToTrash();
|
{
|
||||||
|
BView* view = Window()->CurrentFocus();
|
||||||
|
if (dynamic_cast<BTextView*>(view) != NULL) {
|
||||||
|
// send B_DELETE to BTextView
|
||||||
|
char bytes[1];
|
||||||
|
bytes[0] = B_DELETE;
|
||||||
|
view->KeyDown(bytes, 1);
|
||||||
|
} else {
|
||||||
|
// send file to Trash
|
||||||
|
DoMoveToTrash();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case kCleanupAll:
|
case kCleanupAll:
|
||||||
Cleanup(true);
|
Cleanup(true);
|
||||||
@@ -6696,12 +6707,6 @@ BPoseView::KeyDown(const char* bytes, int32 count)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case B_DELETE:
|
|
||||||
{
|
|
||||||
DoMoveToTrash();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case B_BACKSPACE:
|
case B_BACKSPACE:
|
||||||
{
|
{
|
||||||
if (IsTypeAheadFiltering()) {
|
if (IsTypeAheadFiltering()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user