Avoid overriding wxDirDialog::GetPath[s]() unnecessarily
Don't duplicate practically the same code in all ports, just add m_paths itself to the base class. The only drawback of doing this is that it's unused in the ports not (yet) using it, but this saves enough code in the aggregate to be worth it.
This commit is contained in:
@@ -90,19 +90,20 @@ public:
|
||||
virtual wxString GetMessage() const { return m_message; }
|
||||
virtual wxString GetPath() const
|
||||
{
|
||||
wxCHECK_MSG( !HasFlag(wxDD_MULTIPLE), wxString(), "When using wxDD_MULTIPLE, must call GetPaths() instead" );
|
||||
wxCHECK_MSG( !HasFlag(wxDD_MULTIPLE), wxString(),
|
||||
"When using wxDD_MULTIPLE, must call GetPaths() instead" );
|
||||
return m_path;
|
||||
}
|
||||
|
||||
virtual void GetPaths(wxArrayString& paths) const
|
||||
{
|
||||
paths.clear();
|
||||
paths.push_back(m_path);
|
||||
paths = m_paths;
|
||||
}
|
||||
|
||||
protected:
|
||||
wxString m_message;
|
||||
wxString m_path;
|
||||
wxArrayString m_paths;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user