ui: Fixed location pickers used root directory when empty

This commit is contained in:
Eberhard Graether
2017-12-11 20:29:51 +01:00
parent 5d3dd37ff5
commit b3ff2e3c5c
2 changed files with 2 additions and 2 deletions
@@ -78,7 +78,7 @@ void QtListItemWidget::handleButtonPress()
{
FilePath path(m_data->text().toStdString());
FilePath relativeRoot = m_list->getRelativeRootDirectory();
if (!relativeRoot.empty())
if (!path.empty() && !path.isAbsolute() && !relativeRoot.empty())
{
path = relativeRoot.concat(path);
}
+1 -1
View File
@@ -100,7 +100,7 @@ void QtLocationPicker::changeEvent(QEvent *event)
void QtLocationPicker::handleButtonPress()
{
FilePath path(m_data->text().toStdString());
if (!m_relativeRootDirectory.empty())
if (!path.empty() && !path.isAbsolute() && !m_relativeRootDirectory.empty())
{
path = m_relativeRootDirectory.concat(path);
}