+void wxDirButton::SetPath(const wxString &str)
+{
+ m_path = str;
+
+ // wxDirButton uses the "current-folder-changed" signal which is triggered also
+ // when we set the path on the dialog associated with this button; thus we need
+ // to set the following flag to avoid sending a wxFileDirPickerEvent from this
+ // function (which would be inconsistent with wxFileButton's behaviour and in
+ // general with all wxWidgets control-manipulation functions which do not send events).
+ m_bIgnoreNextChange = true;
+
+ UpdateDialogPath(m_dialog);
+}
+