1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-23 17:29:42 +01:00

* Don't let NSSearchField grab Cmd + A.

This commit is contained in:
Christian Muehlhaeuser 2013-01-18 14:51:09 +01:00
parent 3737c251d4
commit 13bee7fad6

View File

@ -24,6 +24,7 @@ THE SOFTWARE.
#include "moc_qsearchfield.cpp"
#include "qocoa_mac.h"
#include "utils/Logger.h"
#import "Foundation/NSAutoreleasePool.h"
#import "Foundation/NSNotification.h"
@ -104,12 +105,12 @@ static const unsigned short kKeycodeV = 9;
if ([event type] == NSKeyDown && [event modifierFlags] & NSCommandKeyMask)
{
const unsigned short keyCode = [event keyCode];
if (keyCode == kKeycodeA) // Cmd+a
/* if (keyCode == kKeycodeA) // Cmd+a
{
[self performSelector:@selector(selectText:)];
return YES;
}
else if (keyCode == kKeycodeC) // Cmd+c
else*/ if (keyCode == kKeycodeC) // Cmd+c
{
QClipboard* clipboard = QApplication::clipboard();
clipboard->setText(toQString([self stringValue]));