From 94cc1efbcccf90a1ae5f4c7233624e17395fb3ad Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 11 Oct 2018 11:21:28 +0100 Subject: [PATCH] Clear filter when poping up net selector. Even when useful it's unexpected, and GTK has issues with focus and selection inside the control, making it hard to clear. --- common/widgets/net_selector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/widgets/net_selector.cpp b/common/widgets/net_selector.cpp index 1831343a3b..18c45792a0 100644 --- a/common/widgets/net_selector.cpp +++ b/common/widgets/net_selector.cpp @@ -151,6 +151,10 @@ public: void OnPopup() override { + // While it can sometimes be useful to keep the filter, it's always expected. + // Better to clear it. + m_filterCtrl->Clear(); + // The updateSize() call in GetAdjustedSize() leaves the height off-by-one for // some reason, so do it again. updateSize(); @@ -159,8 +163,6 @@ public: void OnStartingKey( wxKeyEvent& aEvent ) { doSetFocus( m_filterCtrl ); - - m_filterCtrl->Clear(); doStartingKey( aEvent ); }