Don't unregister delegate notifications if same window delegate is set again

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36190 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Doug Simons 2013-02-22 23:24:40 +00:00
parent c9f3f71f41
commit 3dab64bcc1
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2013-01-31 Doug Simons <doug.simons@testplant.com>
* Source/NSindow.m: Don't unregister delegate notifications if same delegate is set twice.
2013-02-21 Frank Le Grand <frank.legrand@testplant.com>
Prelimirary/basic implementation of NSCollectionView and NSCollectionViewItem.
This is a work in progress.

View file

@ -5320,6 +5320,9 @@ current key view.<br />
*/
- (void) setDelegate: (id)anObject
{
if (anObject == _delegate)
return; // don't remove previously registered notifications if delegate is unchanged!
if (_delegate)
{
[nc removeObserver: _delegate name: nil object: self];