Fix selection event generation in wxMac wxListBox
Prevents deselecting the selected item in single-selection listbox. Also generate correct events in the multi-selection case by reusing the existing wxListBoxBase::CalcAndSendEvent() method. Closes #15603.
This commit is contained in:
@@ -125,6 +125,12 @@ public:
|
||||
bool MacGetBlockEvents() const { return m_blockEvents; }
|
||||
|
||||
virtual void HandleLineEvent( unsigned int n, bool doubleClick );
|
||||
|
||||
// These are called by wxNSTableView
|
||||
using wxListBoxBase::DoChangeSingleSelection;
|
||||
using wxListBoxBase::CalcAndSendEvent;
|
||||
int GetOldSelection() const { return m_oldSelections.empty() ? wxNOT_FOUND : m_oldSelections[0]; }
|
||||
|
||||
protected:
|
||||
// callback for derived classes which may have to insert additional data
|
||||
// at a certain line - which cannot be predetermined for sorted list data
|
||||
|
Reference in New Issue
Block a user