From 4203104d54db70e7d39452acb735fac4412c0466 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 15 Dec 2019 16:26:18 +0100 Subject: [PATCH] Fix using wxTreeListCtrl with generic wxDataViewCtrl in wxGTK Restrict GTK workaround in wxTreeListModel::IsContainer() to the native version, it does have a drawback when using the generic one as it resulted in all items having the expander button. See #18632. --- src/generic/treelist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/treelist.cpp b/src/generic/treelist.cpp index 6c599100ae..a4fdfd3fc4 100644 --- a/src/generic/treelist.cpp +++ b/src/generic/treelist.cpp @@ -735,7 +735,7 @@ bool wxTreeListModel::IsContainer(const wxDataViewItem& item) const // adding the item itself) and we can't know whether we're container // or not by then. Luckily, always returning true doesn't have any // serious drawbacks for us. -#ifdef __WXGTK__ +#if defined(__WXGTK__) && defined(wxHAS_NATIVE_DATAVIEWCTRL) wxUnusedVar(item); return true;