Tracker: Fix B_UNDO/B_REDO forwarding to a focused BTextView.

This commit is contained in:
Augustin Cavalier 2017-04-29 15:09:05 -04:00
parent 56f9e8b759
commit a8ae893bc3

View File

@ -1399,6 +1399,26 @@ BContainerWindow::MessageReceived(BMessage* message)
break; break;
} }
case B_UNDO: {
BView* view = CurrentFocus();
if (dynamic_cast<BTextView*>(view) == NULL) {
FSUndo();
} else {
view->MessageReceived(message);
}
break;
}
case B_REDO: {
BView* view = CurrentFocus();
if (dynamic_cast<BTextView*>(view) == NULL) {
FSRedo();
} else {
view->MessageReceived(message);
}
break;
}
case kNewFolder: case kNewFolder:
PostMessage(message, PoseView()); PostMessage(message, PoseView());
break; break;
@ -1690,14 +1710,6 @@ BContainerWindow::MessageReceived(BMessage* message)
UpdateTitle(); UpdateTitle();
break; break;
case B_UNDO:
FSUndo();
break;
case B_REDO:
FSRedo();
break;
default: default:
_inherited::MessageReceived(message); _inherited::MessageReceived(message);
break; break;