ui: Filepicker fixes
* don't reset filepath used to open file picker dialog for SaveFileDialog * don't reset filepath used to open filepicker for OpenProject dialog * fixed non-native file picker starts in wrong directory if provided with filename to open (instead of directory) * fixed non-native dialog displays machines root directory if empty path is provided
This commit is contained in:
@@ -108,11 +108,11 @@ void QtLocationPicker::handleButtonPress()
|
||||
QString fileName;
|
||||
if (m_pickDirectory)
|
||||
{
|
||||
fileName = QtFileDialog::getExistingDirectory(this, tr("Select Directory"), QString::fromStdString(path.str()));
|
||||
fileName = QtFileDialog::getExistingDirectory(this, tr("Select Directory"), path);
|
||||
}
|
||||
else
|
||||
{
|
||||
fileName = QtFileDialog::getOpenFileName(this, tr("Open File"), QString::fromStdString(path.str()), m_fileFilter);
|
||||
fileName = QtFileDialog::getOpenFileName(this, tr("Open File"), path, m_fileFilter);
|
||||
}
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user