Commit 82c0d537 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk

smart list: fix row selection

Do not change row selection on interaction status updated.

Change-Id: I8deb6b5558429d8054a7e647b0a59ad6f0541c31
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 77a50d57
......@@ -380,15 +380,16 @@ NSInteger const REQUEST_SEG = 1;
- (void)tableViewSelectionDidChange:(NSNotification *)notification
{
NSInteger row = [notification.object selectedRow];
NSInteger rows = [smartView numberOfRows];
[smartView enumerateAvailableRowViewsUsingBlock:^(NSTableRowView *rowView, NSInteger row){
NSTableRowView* cellRowView = [smartView rowViewAtRow:row makeIfNecessary:NO];
if(rowView.selected){
for (int i = 0; i< rows; i++) {
NSTableRowView* cellRowView = [smartView rowViewAtRow:i makeIfNecessary:YES];
if (i == row) {
cellRowView.backgroundColor = [NSColor controlColor];
}else{
} else {
cellRowView.backgroundColor = [NSColor whiteColor];
}
}];
}
if (row == -1)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment