ui: Fixed location pickers used root directory when empty
This commit is contained in:
@@ -78,7 +78,7 @@ void QtListItemWidget::handleButtonPress()
|
|||||||
{
|
{
|
||||||
FilePath path(m_data->text().toStdString());
|
FilePath path(m_data->text().toStdString());
|
||||||
FilePath relativeRoot = m_list->getRelativeRootDirectory();
|
FilePath relativeRoot = m_list->getRelativeRootDirectory();
|
||||||
if (!relativeRoot.empty())
|
if (!path.empty() && !path.isAbsolute() && !relativeRoot.empty())
|
||||||
{
|
{
|
||||||
path = relativeRoot.concat(path);
|
path = relativeRoot.concat(path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ void QtLocationPicker::changeEvent(QEvent *event)
|
|||||||
void QtLocationPicker::handleButtonPress()
|
void QtLocationPicker::handleButtonPress()
|
||||||
{
|
{
|
||||||
FilePath path(m_data->text().toStdString());
|
FilePath path(m_data->text().toStdString());
|
||||||
if (!m_relativeRootDirectory.empty())
|
if (!path.empty() && !path.isAbsolute() && !m_relativeRootDirectory.empty())
|
||||||
{
|
{
|
||||||
path = m_relativeRootDirectory.concat(path);
|
path = m_relativeRootDirectory.concat(path);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user