mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
* Source/NSindow.m (-setDelegate:): Don't unregister delegate
notifications if same delegate is set twice. Patch by Doug Simons <doug.simons@testplant.com> git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36192 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0561a46d2f
commit
ae607757b3
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-02-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSindow.m (-setDelegate:): Don't unregister delegate
|
||||
notifications if same delegate is set twice.
|
||||
Patch by Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
2013-02-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow.m (-initWithCoder:),
|
||||
|
|
|
@ -5234,6 +5234,12 @@ current key view.<br />
|
|||
*/
|
||||
- (void) setDelegate: (id)anObject
|
||||
{
|
||||
if (anObject == _delegate)
|
||||
{
|
||||
// don't remove previously registered notifications if delegate is unchanged!
|
||||
return;
|
||||
}
|
||||
|
||||
if (_delegate)
|
||||
{
|
||||
[nc removeObserver: _delegate name: nil object: self];
|
||||
|
|
Loading…
Reference in a new issue