Skip to content
Snippets Groups Projects
Commit 82c0d537 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk
Browse files

smart list: fix row selection


Do not change row selection on interaction status updated.

Change-Id: I8deb6b5558429d8054a7e647b0a59ad6f0541c31
Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 77a50d57
No related branches found
No related tags found
No related merge requests found
...@@ -380,15 +380,16 @@ NSInteger const REQUEST_SEG = 1; ...@@ -380,15 +380,16 @@ NSInteger const REQUEST_SEG = 1;
- (void)tableViewSelectionDidChange:(NSNotification *)notification - (void)tableViewSelectionDidChange:(NSNotification *)notification
{ {
NSInteger row = [notification.object selectedRow]; NSInteger row = [notification.object selectedRow];
NSInteger rows = [smartView numberOfRows];
[smartView enumerateAvailableRowViewsUsingBlock:^(NSTableRowView *rowView, NSInteger row){ for (int i = 0; i< rows; i++) {
NSTableRowView* cellRowView = [smartView rowViewAtRow:row makeIfNecessary:NO]; NSTableRowView* cellRowView = [smartView rowViewAtRow:i makeIfNecessary:YES];
if(rowView.selected){ if (i == row) {
cellRowView.backgroundColor = [NSColor controlColor]; cellRowView.backgroundColor = [NSColor controlColor];
} else { } else {
cellRowView.backgroundColor = [NSColor whiteColor]; cellRowView.backgroundColor = [NSColor whiteColor];
} }
}]; }
if (row == -1) if (row == -1)
return; return;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment