From 5b774e5249582dc51e9f1c9053d59fbeeb22d3b3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 20 Jul 2008 22:48:34 +0000 Subject: [PATCH] fix generation of events for an initially empty wxDirPickerCtrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 3 ++- src/gtk/filepicker.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index bf8a704222..83224d11ab 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -132,6 +132,7 @@ wxMSW: wxGTK: - Fix masking of disabled bitmaps in wxMenuItem and wxStaticBitmap. +- Fix generation of events for an initially empty wxDirPickerCtrl. wxMac: @@ -426,7 +427,7 @@ All: overlaps UTF-8 characters boundary. - Account for lines without newline at the end in wxExecute(). - Added wxString::char_str(), wchar_str(), From8BitData(), To8BitData(), - FromUTF8(), ToUTF8() and utf8_str() methods for forward compatiblity + FromUTF8(), ToUTF8() and utf8_str() methods for forward compatibility with wxWidgets 3. All (Unix): diff --git a/src/gtk/filepicker.cpp b/src/gtk/filepicker.cpp index 187813d226..7549157623 100644 --- a/src/gtk/filepicker.cpp +++ b/src/gtk/filepicker.cpp @@ -263,8 +263,14 @@ wxDirButton::~wxDirButton() m_dialog->m_widget = NULL; } -void wxDirButton::SetPath(const wxString &str) +void wxDirButton::SetPath(const wxString& str) { + if ( m_path == str ) + { + // don't do anything and especially don't set m_bIgnoreNextChange + return; + } + m_path = str; // wxDirButton uses the "current-folder-changed" signal which is triggered also