mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-04 22:49:07 +02:00
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.
This commit is contained in:
parent
3d8a9ffad9
commit
6b010662a4
@ -185,7 +185,11 @@ PrefsDialog::PrefsDialog(wxWindow * parent)
|
|||||||
Fit();
|
Fit();
|
||||||
wxSize sz = GetSize();
|
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) {
|
if (sz.x > 800) {
|
||||||
sz.x = 800;
|
sz.x = 800;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user