TeamWindow: Fix accidental double message sending.
- When we explicitly handle sending B_COPY/B_SELECT_ALL, don't then pass control back to BWindow::DispatchMessage(), as that will wind up sending the message to the target view twice.
This commit is contained in:
@@ -236,8 +236,10 @@ TeamWindow::DispatchMessage(BMessage* message, BHandler* handler)
|
|||||||
case B_COPY:
|
case B_COPY:
|
||||||
case B_SELECT_ALL:
|
case B_SELECT_ALL:
|
||||||
BView* focusView = CurrentFocus();
|
BView* focusView = CurrentFocus();
|
||||||
if (focusView != NULL)
|
if (focusView != NULL) {
|
||||||
focusView->MessageReceived(message);
|
focusView->MessageReceived(message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
BWindow::DispatchMessage(message, handler);
|
BWindow::DispatchMessage(message, handler);
|
||||||
|
|||||||
Reference in New Issue
Block a user