From 441bc006da2cd8df038c4ff1ec21583f83cd2742 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 29 Nov 2024 17:26:33 +0100 Subject: [PATCH] Don't recreate wxHyperlinkCtrl in widgets sample unnecessarily There is no need to do this after just changing its label or URL, this shouldn't, and doesn't require full control recreation. --- samples/widgets/hyperlnk.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/widgets/hyperlnk.cpp b/samples/widgets/hyperlnk.cpp index d9dd511017..0314ca9312 100644 --- a/samples/widgets/hyperlnk.cpp +++ b/samples/widgets/hyperlnk.cpp @@ -347,13 +347,11 @@ void HyperlinkWidgetsPage::OnButtonReset(wxCommandEvent& WXUNUSED(event)) void HyperlinkWidgetsPage::OnButtonSetLabel(wxCommandEvent& WXUNUSED(event)) { m_hyperlink->SetLabel(m_label->GetValue()); - CreateHyperlink(); } void HyperlinkWidgetsPage::OnButtonSetURL(wxCommandEvent& WXUNUSED(event)) { m_hyperlink->SetURL(m_url->GetValue()); - CreateHyperlink(); } void HyperlinkWidgetsPage::OnAlignment(wxCommandEvent& WXUNUSED(event))