From 9991a8b490ad2b1d7351c1c6d41cdd718ee7a637 Mon Sep 17 00:00:00 2001 From: Tobias Hammer Date: Sun, 3 Apr 2022 16:13:37 +0200 Subject: [PATCH] Enable wxCheckListBox in wxDebugReportDialog It was wrongly guarded by wxUSE_OWNER_DRAWN but there are wxCheckListBox implementations available for most platforms. Use correct wxUSE_CHECKLISTBOX instead. Closes #22263. --- src/generic/dbgrptg.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/generic/dbgrptg.cpp b/src/generic/dbgrptg.cpp index 13d951a175..1bf8df6db0 100644 --- a/src/generic/dbgrptg.cpp +++ b/src/generic/dbgrptg.cpp @@ -267,7 +267,7 @@ private: wxDebugReport& m_dbgrpt; -#if wxUSE_OWNER_DRAWN +#if wxUSE_CHECKLISTBOX wxCheckListBox *m_checklst; #else wxListBox *m_checklst; @@ -343,7 +343,7 @@ wxDebugReportDialog::wxDebugReportDialog(wxDebugReport& dbgrpt) wxSizerFlags().Border(wxTOP)); sizerFileBtns->AddStretchSpacer(1); -#if wxUSE_OWNER_DRAWN +#if wxUSE_CHECKLISTBOX m_checklst = new wxCheckListBox(this, wxID_ANY); #else m_checklst = new wxListBox(this, wxID_ANY); @@ -395,7 +395,7 @@ bool wxDebugReportDialog::TransferDataToWindow() if ( m_dbgrpt.GetFile(n, &name, &desc) ) { m_checklst->Append(name + wxT(" (") + desc + wxT(')')); -#if wxUSE_OWNER_DRAWN +#if wxUSE_CHECKLISTBOX m_checklst->Check(n); #endif @@ -408,7 +408,7 @@ bool wxDebugReportDialog::TransferDataToWindow() bool wxDebugReportDialog::TransferDataFromWindow() { -#if wxUSE_OWNER_DRAWN +#if wxUSE_CHECKLISTBOX // any unchecked files should be removed from the report const size_t count = m_checklst->GetCount(); for ( size_t n = 0; n < count; n++ )