Commit 5aab6ec7 authored by Christiaan Janssen's avatar Christiaan Janssen
Browse files

QmlDesigner.PropertyEditor: keeping old file name when file dialog cancelled

parent 5f712ed5
...@@ -66,7 +66,9 @@ void FileWidget::lineEditChanged() ...@@ -66,7 +66,9 @@ void FileWidget::lineEditChanged()
void FileWidget::buttonPressed() void FileWidget::buttonPressed()
{ {
setFileNameStr(QFileDialog::getOpenFileName()); QString newFile = QFileDialog::getOpenFileName();
if (!newFile.isEmpty())
setFileNameStr(newFile);
} }
void FileWidget::setFileNameStr(const QString &fileName) void FileWidget::setFileNameStr(const QString &fileName)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment