Fix TreeCtrlTestCase assert failure under Windows.
A '-' keypress doesn't collapse a tree item with the native MSW tree
control. Instead, when not using the generic tree control, simulate a
keypress of WXK_LEFT to collapse the root item . This fixes the assert
checking if the root item is collapsed after the keypress.
Regression since 9d7a7ec556
(which
mistakenly may have had treectrltest.cpp as part of its commit).
This commit is contained in:
@@ -25,6 +25,10 @@
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImageList;
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#define wxHAS_GENERIC_TREECTRL
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTreeCtrlBase
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -456,18 +460,12 @@ private:
|
||||
// include the platform-dependent wxTreeCtrl class
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WXUNIVERSAL__)
|
||||
#ifdef wxHAS_GENERIC_TREECTRL
|
||||
#include "wx/generic/treectlg.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/treectrl.h"
|
||||
#elif defined(__WXMOTIF__)
|
||||
#include "wx/generic/treectlg.h"
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/generic/treectlg.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/generic/treectlg.h"
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/generic/treectlg.h"
|
||||
#else
|
||||
#error "unknown native wxTreeCtrl implementation"
|
||||
#endif
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
Reference in New Issue
Block a user