* Framework/PCProjectInspector.m: (-removeAuthor): Improve selection

of author list items after item deletion. Inspired by bug #25571. 
Bug should be closed.




git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35271 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2012-07-09 00:05:18 +00:00
parent 8dde4d19e4
commit d98014879b
2 changed files with 18 additions and 10 deletions

View file

@ -1,3 +1,9 @@
2012-07-09 Serg Stoyan <stoyan255@ukr.net>
* Framework/PCProjectInspector.m: (-removeAuthor): Improve selection
of author list items after item deletion. Inspired by bug #25571.
Bug should be closed.
2012-06-12 Riccardo Mottola <rm@gnu.org>
* Framework/PCProjectWindow.m

View file

@ -254,8 +254,9 @@
// When user ends editing of text field with Tab or changing focus, entered
// changes should be accepted. The exception is PCFileName fields. I'm not sure
// if this is correct implementation (action is performed twice if user ends
// editing with Enter key)
// if this is correct implementation. Action is performed twice if user ends
// editing with Enter key.
- (void)controlTextDidEndEditing:(NSNotification *)aNotif
{
NSControl *anObject = [aNotif object];
@ -650,17 +651,18 @@
- (void)removeAuthor:(id)sender
{
int selectedRow = [authorsList selectedRow];
if (selectedRow >= 0)
{
[authorsItems removeObjectAtIndex:selectedRow];
[authorsList reloadData];
}
{
[authorsList selectRow:selectedRow byExtendingSelection:NO];
[authorsItems removeObjectAtIndex:selectedRow];
[authorsList reloadData];
}
if ([authorsList selectedRow] < 0 && [authorsItems count] > 0)
{
[authorsList selectRow:[authorsItems count]-1 byExtendingSelection:NO];
}
{
[authorsList selectRow:[authorsItems count]-1 byExtendingSelection:NO];
}
[project setProjectDictObject:authorsItems forKey:PCAuthors notify:YES];
}