wxString wxGenericDirCtrl::GetPath() const
{
+ // Allow calling GetPath() in multiple selection from OnSelFilter
+ if (m_treeCtrl->HasFlag(wxTR_MULTIPLE))
+ {
+ wxArrayTreeItemIds items;
+ m_treeCtrl->GetSelections(items);
+ if (items.size() > 0)
+ {
+ // return first string only
+ wxTreeItemId id = items[0];
+ wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(id);
+ return data->m_path;
+ }
+
+ return wxEmptyString;
+ }
+
wxTreeItemId id = m_treeCtrl->GetSelection();
if (id)
{