Don't allow using GetPath/GetFilename() with wxFD_MULTIPLE

GetPaths/GetFilenames() must be used instead when more than one file
could be selected: document this and assert if the wrong functions are
called.

Closes https://github.com/wxWidgets/wxWidgets/pull/1883
This commit is contained in:
Ian McInerney
2020-06-02 10:34:37 +01:00
committed by Vadim Zeitlin
parent 284cf9a872
commit 4ac648901d
6 changed files with 35 additions and 4 deletions

View File

@@ -264,6 +264,9 @@ public:
/**
Returns the default filename.
@note This function can't be used with dialogs which have the @c wxFD_MULTIPLE style,
use GetFilenames() instead.
*/
virtual wxString GetFilename() const;
@@ -298,6 +301,9 @@ public:
/**
Returns the full path (directory and filename) of the selected file.
@note This function can't be used with dialogs which have the @c wxFD_MULTIPLE style,
use GetPaths() instead.
*/
virtual wxString GetPath() const;