Commit 34016549 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: fix FileWidget

See: Bauhaus-577
parent 01e364d5
......@@ -114,8 +114,10 @@ void FileWidget::setFileName(const QUrl &fileName)
return;
m_fileName = fileName;
m_lineEdit->setText(fileName.toString());
m_comboBox->setEditText(m_fileName.toString());
if (m_lineEdit->text() != fileName.toString())
m_lineEdit->setText(fileName.toString());
if (m_comboBox->currentText() != fileName.toString())
m_comboBox->setEditText(m_fileName.toString());
emit fileNameChanged(fileName);
}
......
......@@ -396,19 +396,22 @@ void PropertyEditor::changeValue(const QString &propertyName)
castedValue = QVariant(newColor);
}
try {
if (!value->value().isValid()) { //reset
fxObjectNode.removeVariantProperty(propertyName);
} else {
if (castedValue.isValid() && !castedValue.isNull())
m_locked = true;
if (!castedValue.isValid())
return;
try {
if (!value->value().isValid()) { //reset
fxObjectNode.removeVariantProperty(propertyName);
} else {
if (castedValue.isValid() && !castedValue.isNull())
m_locked = true;
fxObjectNode.setVariantProperty(propertyName, castedValue);
m_locked = false;
}
}
catch (RewritingException &e) {
QMessageBox::warning(0, "Error", e.description());
}
}
catch (RewritingException &e) {
QMessageBox::warning(0, "Error", e.description());
}
}
void PropertyEditor::changeExpression(const QString &name)
......
Markdown is supported
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