macOS wxTextEntry::GetTextPeer fix for wxGenericComboCtrl (#1931)
* overriding GetTextPeer in generic combo control
* undo 81e3760e4a
* inlining GetTextPeer()
* moving out of line to reduce header include
This commit is contained in:
@@ -91,8 +91,8 @@ protected:
|
|||||||
virtual GtkEditable *GetEditable() const wxOVERRIDE { return NULL; }
|
virtual GtkEditable *GetEditable() const wxOVERRIDE { return NULL; }
|
||||||
virtual GtkEntry *GetEntry() const wxOVERRIDE { return NULL; }
|
virtual GtkEntry *GetEntry() const wxOVERRIDE { return NULL; }
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXOSX__)
|
||||||
// Looks like there's nothing we need to override here
|
virtual wxTextWidgetImpl * GetTextPeer() const wxOVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For better transparent background rendering
|
// For better transparent background rendering
|
||||||
|
@@ -458,6 +458,13 @@ bool wxGenericComboCtrl::IsKeyPopupToggle(const wxKeyEvent& event) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__WXOSX__)
|
||||||
|
wxTextWidgetImpl * wxGenericComboCtrl::GetTextPeer() const
|
||||||
|
{
|
||||||
|
return m_text ? m_text->GetTextPeer() : NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __WXUNIVERSAL__
|
#ifdef __WXUNIVERSAL__
|
||||||
|
|
||||||
bool wxGenericComboCtrl::PerformAction(const wxControlAction& action,
|
bool wxGenericComboCtrl::PerformAction(const wxControlAction& action,
|
||||||
|
@@ -988,14 +988,7 @@ void wxOwnerDrawnComboBox::DoClear()
|
|||||||
|
|
||||||
// There is no text entry when using wxCB_READONLY style, so test for it.
|
// There is no text entry when using wxCB_READONLY style, so test for it.
|
||||||
if ( GetTextCtrl() )
|
if ( GetTextCtrl() )
|
||||||
{
|
|
||||||
#ifdef __WXOSX__
|
|
||||||
// this has to be rerouted to the text control explicitly on macOS
|
|
||||||
GetTextCtrl()->Clear();
|
|
||||||
#else
|
|
||||||
wxTextEntry::Clear();
|
wxTextEntry::Clear();
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxOwnerDrawnComboBox::Clear()
|
void wxOwnerDrawnComboBox::Clear()
|
||||||
|
Reference in New Issue
Block a user