From 0f22f25d37b48463abaaedd9eeff075876c93a24 Mon Sep 17 00:00:00 2001 From: PB Date: Mon, 6 Jul 2020 13:13:00 +0200 Subject: [PATCH] Preserve the path when changing flags for wxDirCtrl in Widgets sample Do not reset the path in wxDirCtrl when changing its flags. Resetting the path to the default view where no files are shown may make showing off some flags more difficult. --- samples/widgets/dirctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/widgets/dirctrl.cpp b/samples/widgets/dirctrl.cpp index 7a2c60f717..3632b530d6 100644 --- a/samples/widgets/dirctrl.cpp +++ b/samples/widgets/dirctrl.cpp @@ -263,7 +263,7 @@ void DirCtrlWidgetsPage::CreateDirCtrl() wxGenericDirCtrl *dirCtrl = new wxGenericDirCtrl( this, DirCtrlPage_Ctrl, - wxDirDialogDefaultFolderStr, + m_dirCtrl->GetPath(), wxDefaultPosition, wxDefaultSize, style