X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01e935b6ce48d2a55211d5184bf27e6f930e7a5d..f43426c1b97fe120b04c9a65d855d6861404ac14:/src/mac/carbon/listctrl_mac.cpp diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index 31c3638d6b..f41b579bc8 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -1217,15 +1217,18 @@ long wxListCtrl::InsertColumn(long col, wxListItem& item) } m_dbImpl->InsertColumn(col, type, item.GetText(), just, item.GetWidth()); + // set/remove options based on the wxListCtrl type. + DataBrowserTableViewColumnID id; + m_dbImpl->GetColumnIDFromIndex(col, &id); + DataBrowserPropertyFlags flags; + verify_noerr(m_dbImpl->GetPropertyFlags(id, &flags)); if (GetWindowStyleFlag() & wxLC_EDIT_LABELS) - { - DataBrowserTableViewColumnID id; - m_dbImpl->GetColumnIDFromIndex(col, &id); - DataBrowserPropertyFlags flags; - verify_noerr(m_dbImpl->GetPropertyFlags(id, &flags)); flags |= kDataBrowserPropertyIsEditable; - verify_noerr(m_dbImpl->SetPropertyFlags(id, flags)); + + if (GetWindowStyleFlag() & wxLC_VIRTUAL){ + flags &= ~kDataBrowserListViewSortableColumn; } + verify_noerr(m_dbImpl->SetPropertyFlags(id, flags)); } return col;