From 3e5133c5ffb16822dcb56e109e0d8a5fb3c8af29 Mon Sep 17 00:00:00 2001 From: michael starke Date: Thu, 2 Jan 2014 11:21:30 +0100 Subject: [PATCH] Minor fix to deselection Entries --- MacPass/ContextBar.xib | 42 +++++++++++++++------------- MacPass/MPContextBarViewController.m | 5 +++- MacPass/MPDocument.m | 4 ++- 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/MacPass/ContextBar.xib b/MacPass/ContextBar.xib index b8089f82..3027e81a 100644 --- a/MacPass/ContextBar.xib +++ b/MacPass/ContextBar.xib @@ -1,5 +1,5 @@ - + @@ -7,6 +7,7 @@ + @@ -86,7 +87,7 @@ - + @@ -150,19 +151,19 @@ - - - - + + + @@ -183,16 +184,8 @@ - - + @@ -200,13 +193,22 @@ + - - + + + - + diff --git a/MacPass/MPContextBarViewController.m b/MacPass/MPContextBarViewController.m index 96803c5d..5c94e1b4 100644 --- a/MacPass/MPContextBarViewController.m +++ b/MacPass/MPContextBarViewController.m @@ -26,6 +26,7 @@ typedef NS_ENUM(NSUInteger, MPContextTab) { @property (nonatomic, assign) MPContextTab activeTab; @property (nonatomic, assign) BOOL hasFilter; +/* Filter */ @property (weak) IBOutlet NSButton *filterDoneButton; @property (weak) IBOutlet NSButton *filterTitleButton; @property (weak) IBOutlet NSButton *filterUsernameButton; @@ -33,8 +34,11 @@ typedef NS_ENUM(NSUInteger, MPContextTab) { @property (weak) IBOutlet NSButton *filterPasswordButton; @property (weak) IBOutlet NSTextField *filterLabelTextField; @property (weak) IBOutlet NSSearchField *filterSearchField; +/* History */ @property (weak) IBOutlet HNHGradientView *historyBar; +/* Trash*/ @property (weak) IBOutlet HNHGradientView *trashBar; +@property (weak) IBOutlet NSButton *emptyTrashButton; @end @@ -81,7 +85,6 @@ typedef NS_ENUM(NSUInteger, MPContextTab) { ]; self.trashBar.activeGradient = [[NSGradient alloc] initWithColors:activeColors]; self.trashBar.inactiveGradient = [[NSGradient alloc] initWithColors:inactiveColors]; - [[self view] bind:NSSelectedIndexBinding toObject:self withKeyPath:@"activeTab" options:nil]; } diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 28df5557..940710bd 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -491,7 +491,9 @@ typedef NS_ENUM(NSUInteger, MPAlertType) { [entry remove]; [[self undoManager] setActionName:NSLocalizedString(@"DELETE_ENTRY", "")]; } - self.selectedEntry = nil; + if(self.selectedEntry == entry) { + self.selectedEntry = nil; + } } - (void)deleteGroup:(KPKGroup *)group {