switched from selected to clicked row in copy actions

fixed refactoring but in clipboard clearing
This commit is contained in:
michael starke
2013-03-02 23:39:28 +01:00
parent b021aefd51
commit 72bf306a3c
3 changed files with 5 additions and 6 deletions

View File

@@ -379,12 +379,11 @@ NSString *const _toggleFilterUsernameButton = @"SearchUsername";
#pragma mark Actions #pragma mark Actions
- (void)_copyEntryData:(id)sender { - (void)_copyEntryData:(id)sender {
NSInteger clickedRow = [self.entryTable clickedRow];
NSInteger selectedRow = [self.entryTable selectedRow]; if(clickedRow > [[self.entryArrayController arrangedObjects] count]) {
if(selectedRow > [[self.entryArrayController arrangedObjects] count]) {
return; return;
} }
KdbEntry *selectedEntry = [self.entryArrayController arrangedObjects][selectedRow]; KdbEntry *selectedEntry = [self.entryArrayController arrangedObjects][clickedRow];
if([sender respondsToSelector:@selector(tag)]) { if([sender respondsToSelector:@selector(tag)]) {
MPCopyContentTypeTag contentTag = (MPCopyContentTypeTag)[sender tag]; MPCopyContentTypeTag contentTag = (MPCopyContentTypeTag)[sender tag];

View File

@@ -50,7 +50,7 @@
- (void)_updateNotifications { - (void)_updateNotifications {
if(self.clearPasteboardOnShutdown) { if(self.clearPasteboardOnShutdown) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(clearContents) name:NSApplicationWillTerminateNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_clearPasteboardContents) name:NSApplicationWillTerminateNotification object:nil];
} }
else { else {
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];

View File

@@ -21,7 +21,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>37D</string> <string>37F</string>
<key>LSMinimumSystemVersion</key> <key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string> <string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>