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.
This commit is contained in:
Jeff Young 2018-10-11 11:21:28 +01:00
parent ff85798918
commit 94cc1efbcc
1 changed files with 4 additions and 2 deletions

View File

@ -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 );
}