From 6b010662a4a42f3a59388b918acbed29ec836734 Mon Sep 17 00:00:00 2001 From: "james.k.crook@gmail.com" Date: Thu, 13 Nov 2014 21:10:15 +0000 Subject: [PATCH] Fix runtime problem with wxWidgets 3.0: Dialog size assert. [Patch 0021] From martin@steghoefer.eu (adjusted by James). Due to changes in sizing of dialogs with wx3, an assert about the size of the preferences dialog (was max 800x600) fails, which causes an error dialog to pop up. We've recently decided that screens have got bigger, and increased the default size of the Audacity window. Rather than remove this assert, we've upped its limits so that we can go further before we hit the limit. Other code to try to keep the dialog size near to 800x600 has not been changed. --- src/prefs/PrefsDialog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/prefs/PrefsDialog.cpp b/src/prefs/PrefsDialog.cpp index d6cc2ba9b..72f8b6c27 100644 --- a/src/prefs/PrefsDialog.cpp +++ b/src/prefs/PrefsDialog.cpp @@ -185,7 +185,11 @@ PrefsDialog::PrefsDialog(wxWindow * parent) Fit(); wxSize sz = GetSize(); - wxASSERT_MSG(sz.x <= 800 && sz.y <= 600, wxT("Preferences dialog exceeds max size")); + // This ASSERT used to limit us to 800 x 600. + // However, we think screens have got bigger now, and that was a bit too restrictive. + // The impetus for increasing the limit (before we ASSERT) was that this ASSERT + // was firing with wxWidgets 3.0, which has slightly different sizer behaviour. + wxASSERT_MSG(sz.x <= 1000 && sz.y <= 750, wxT("Preferences dialog exceeds max size")); if (sz.x > 800) { sz.x = 800;