Implement wxDataViewColumn::UnsetAsSortKey() in macOS version
It was impossible to stop sorting the control if it had been sorted before, so implement UnsetAsSortKey() to allow doing it by destroying the current sort descriptor. Closes #18176.
This commit is contained in:
parent
a3f6456f55
commit
2a59c1fb20
@ -128,6 +128,7 @@ wxMSW:
|
||||
wxOSX:
|
||||
|
||||
- Fix dispatching pending events (and CallAfter()) in console applications.
|
||||
- Implement wxDataViewColumn::UnsetAsSortKey() (Daniel Kulp).
|
||||
|
||||
wxQt:
|
||||
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
virtual void SetMinWidth (int minWidth);
|
||||
virtual void SetReorderable(bool reorderable);
|
||||
virtual void SetResizeable (bool resizable);
|
||||
virtual void UnsetAsSortKey();
|
||||
virtual void SetSortable (bool sortable);
|
||||
virtual void SetSortOrder (bool ascending);
|
||||
virtual void SetTitle (wxString const& title);
|
||||
|
@ -3465,6 +3465,13 @@ void wxDataViewColumn::SetResizeable(bool resizable)
|
||||
[m_NativeDataPtr->GetNativeColumnPtr() setResizingMask:NSTableColumnNoResizing];
|
||||
}
|
||||
|
||||
void wxDataViewColumn::UnsetAsSortKey()
|
||||
{
|
||||
NSTableColumn* const tableColumn = m_NativeDataPtr->GetNativeColumnPtr();
|
||||
if ( tableColumn )
|
||||
[tableColumn setSortDescriptorPrototype:nil];
|
||||
}
|
||||
|
||||
void wxDataViewColumn::SetSortable(bool sortable)
|
||||
{
|
||||
// wxDataViewColumnBase::SetSortable(sortable);
|
||||
|
Loading…
Reference in New Issue
Block a user