Fix wxDataViewChoiceRenderer behaviour in wxOSX/Cocoa.
Changing the value of a "choice" cell in wxDataViewCtrl didn't work correctly in wxOSX/Cocoa because wxDataViewChoiceRenderer used the base class version of OSXOnCellChanged() which passed the integer index we received from NSOutlineView to the model instead of the expected string. Fix this by overriding OSXOnCellChanged() in wxDataViewChoiceRenderer itself and using its argument as an integer index of the selection because this is what it is, at least under OS X 10.7. Closes #14373. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -103,6 +103,12 @@ public:
|
||||
wxString GetChoice(size_t index) const { return m_choices[index]; }
|
||||
const wxArrayString& GetChoices() const { return m_choices; }
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
virtual void OSXOnCellChanged(NSObject *value,
|
||||
const wxDataViewItem& item,
|
||||
unsigned col);
|
||||
#endif // Cocoa
|
||||
|
||||
private:
|
||||
wxArrayString m_choices;
|
||||
|
||||
|
Reference in New Issue
Block a user