([selectColumn:byExtendingSelection]):

Do not send NSTableViewSelectionDidChangeNotification when selection
	is not changed (was not always working with flag=NO)
([selectRow:byExtendingSelection]): Likewise


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11163 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Pierre-Yves Rivaille 2001-10-16 21:01:28 +00:00
parent 168db2ce11
commit 2ad9cdfca2

View file

@ -834,6 +834,22 @@ _isCellEditable (id delegate, NSArray *tableColumns,
if (flag == NO)
{
/* If the current selection is the one we want, just ends editing
* This is not just a speed up, it prevents us from sending
* a NSTableViewSelectionDidChangeNotification.
* This behaviour is required by the specifications */
if ([_selectedColumns count] == 1
&& [_selectedColumns containsObject: num] == YES)
{
/* Stop editing if any */
if (_textObject != nil)
{
[self validateEditing];
[self abortEditing];
}
return;
}
/* If _numberOfColumns == 1, we can skip trying to deselect the
only column - because we have been called to select it. */
if (_numberOfColumns > 1)
@ -887,6 +903,22 @@ byExtendingSelection: (BOOL)flag
if (flag == NO)
{
/* If the current selection is the one we want, just ends editing
* This is not just a speed up, it prevents us from sending
* a NSTableViewSelectionDidChangeNotification.
* This behaviour is required by the specifications */
if ([_selectedRows count] == 1
&& [_selectedRows containsObject: num] == YES)
{
/* Stop editing if any */
if (_textObject != nil)
{
[self validateEditing];
[self abortEditing];
}
return;
}
/* If _numberOfRows == 1, we can skip trying to deselect the
only row - because we have been called to select it. */
if (_numberOfRows > 1)