mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:37:39 +00:00
fix to get open panels working again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28801 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
be1045089a
commit
23c6ece351
2 changed files with 19 additions and 11 deletions
|
@ -1872,19 +1872,20 @@ See -runModalForWindow:
|
|||
*/
|
||||
- (void) stopModalWithCode: (int)returnCode
|
||||
{
|
||||
if (_session == 0)
|
||||
/* According to the spec, there is no exception which is thrown
|
||||
* if we are not currently in a modal session. While it is not
|
||||
* good practice to call this when we're not, we shouldn't throw
|
||||
* an exception.
|
||||
*/
|
||||
if (_session != 0 && _session->runState == NSRunContinuesResponse)
|
||||
{
|
||||
// According to the spec, there is no exception which is thrown if we are not
|
||||
// currently in a modal session. While it is not good practice to call this
|
||||
// when we're not, we shouldn't throw an exception.
|
||||
return;
|
||||
if (returnCode == NSRunContinuesResponse)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"stopModalWithCode: with NSRunContinuesResponse"];
|
||||
}
|
||||
_session->runState = returnCode;
|
||||
}
|
||||
else if (returnCode == NSRunContinuesResponse)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"stopModalWithCode: with NSRunContinuesResponse"];
|
||||
}
|
||||
_session->runState = returnCode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue