Author: ericwa
Date: Tue Mar 25 22:56:47 2014
New Revision: 10645
URL: http://svn.gna.org/viewcvs/etoile?rev=10645&view=rev
Log:
Typewriter: when the selected tag changes, select the top note in the list
Modified:
trunk/Etoile/Frameworks/CoreObject/Samples/Typewriter/EWNoteListDataSource.m
Modified:
trunk/Etoile/Frameworks/CoreObject/Samples/Typewriter/EWNoteListDataSource.m
URL:
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/CoreObject/Samples/Typewriter/EWNoteListDataSource.m?rev=10645&r1=10644&r2=10645&view=diff
==============================================================================
---
trunk/Etoile/Frameworks/CoreObject/Samples/Typewriter/EWNoteListDataSource.m
(original)
+++
trunk/Etoile/Frameworks/CoreObject/Samples/Typewriter/EWNoteListDataSource.m
Tue Mar 25 22:56:47 2014
@@ -114,6 +114,17 @@
row++;
}
}
+
+ if ([newSelectedRows count] == 0
+ && [objs count] > 0)
+ {
+ // If there was no previous selection, select the top note.
+ [newSelectedRows addIndex: 0];
+ }
+
+ // Clear the selection so the following line generates a selection
changed
+ // notification.
+ [self.tableView selectRowIndexes: [NSIndexSet indexSet]
byExtendingSelection: NO];
[self.tableView selectRowIndexes: newSelectedRows byExtendingSelection:
NO];
[self cacheSelection];
}
_______________________________________________
Etoile-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-cvs