Fix the fix done in fa0338a9e6

This commit is contained in:
Ian McInerney 2023-07-17 22:15:11 +01:00
parent fa0338a9e6
commit da1e82d57e
1 changed files with 4 additions and 0 deletions

View File

@ -83,15 +83,19 @@ LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( wxWindow* parent, wxWindowID id, const w
if( choices != nullptr )
ResyncBitmapOnly();
#ifdef __WXMAC__
GetParent()->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( LAYER_BOX_SELECTOR::onKeyDown ),
nullptr, this );
#endif
}
LAYER_BOX_SELECTOR::~LAYER_BOX_SELECTOR()
{
#ifdef __WXMAC__
GetParent()->Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( LAYER_BOX_SELECTOR::onKeyDown ),
nullptr, this );
#endif
}