From 0fbcff4594d6dd3a60063a8734b2d41f17cb7bd2 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 5 Mar 2016 22:59:14 +0100 Subject: [PATCH] Fix parent dialog of Error Popup If the parent dialog of the Error Popup is wrong, the OK button in it will not manage to pop it down. Migrating the Tourney Options to their own DialogClass had changed testing for a parent other than the board window from TransientDlg to MasterDlg, but Toerney Options was not the only such dialog throwing up errors. (E.g. New Variant coulddo it too.) So we now test if MasterDlg or TransientDlg is up, and use those as parent if they are. --- dialogs.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dialogs.c b/dialogs.c index 7db75db..890ed13 100644 --- a/dialogs.c +++ b/dialogs.c @@ -2289,8 +2289,10 @@ ErrorPopUp (char *title, char *label, int modal) { errorUp = True; errorOptions[1].name = label; - if(dialogError = shellUp[MasterDlg]) - GenericPopUp(errorOptions+1, title, FatalDlg, MasterDlg, MODAL, 0); // pop up as daughter of the transient dialog + if(dialogError = shellUp[TransientDlg]) + GenericPopUp(errorOptions+1, title, FatalDlg, TransientDlg, MODAL, 0); // pop up as daughter of the transient dialog + else if(dialogError = shellUp[MasterDlg]) + GenericPopUp(errorOptions+1, title, FatalDlg, MasterDlg, MODAL, 0); // pop up as daughter of the master dialog else GenericPopUp(errorOptions+modal, title, modal ? FatalDlg: ErrorDlg, BoardWindow, modal, 0); // kludge: option start address indicates modality } -- 1.7.0.4