Fixed a bug where double clicking a column would open the selected file.

This commit is contained in:
Virgil Dupras 2010-02-09 14:55:51 +01:00
parent 39f1cac2c8
commit 6b190bc184
2 changed files with 12 additions and 1 deletions

View File

@ -61,6 +61,8 @@ http://www.hardcoded.net/licenses/hs_license
- (IBAction)markSelected:(id)sender;
- (IBAction)markToggle:(id)sender;
- (IBAction)moveMarked:(id)sender;
- (IBAction)openClicked:(id)sender;
- (IBAction)openSelected:(id)sender;
- (IBAction)removeMarked:(id)sender;
- (IBAction)removeSelected:(id)sender;
- (IBAction)renameSelected:(id)sender;

View File

@ -60,7 +60,7 @@ http://www.hardcoded.net/licenses/hs_license
[pmSwitch setSelectedSegment:0];
[py setDisplayDeltaValues:b2n(_displayDelta)];
[matches setTarget:self];
[matches setDoubleAction:@selector(openSelected:)];
[matches setDoubleAction:@selector(openClicked:)];
[self refreshStats];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(registrationRequired:) name:RegistrationRequired object:nil];
@ -362,6 +362,15 @@ http://www.hardcoded.net/licenses/hs_license
}
}
- (IBAction)openClicked:(id)sender
{
if ([matches clickedRow] < 0) {
return;
}
[matches selectRowIndexes:[NSIndexSet indexSetWithIndex:[matches clickedRow]] byExtendingSelection:NO];
[py openSelected];
}
- (IBAction)openSelected:(id)sender
{
[self performPySelection:[self getSelectedPaths:NO]];