Gui: fix ExpLineEdit::apply()
ExpLineEdit was originally created for editing PropertyString with optional expression. It has since been extended to be used by any type of property.
This commit is contained in:
@@ -1438,8 +1438,10 @@ ExpLineEdit::ExpLineEdit(QWidget* parent, bool expressionOnly)
|
||||
bool ExpLineEdit::apply(const std::string& propName) {
|
||||
|
||||
if (!ExpressionBinding::apply(propName)) {
|
||||
QString val = QString::fromUtf8(Base::Interpreter().strToPython(text().toUtf8()).c_str());
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "%s = \"%s\"", propName.c_str(), val.constData());
|
||||
if(!autoClose) {
|
||||
QString val = QString::fromUtf8(Base::Interpreter().strToPython(text().toUtf8()).c_str());
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "%s = \"%s\"", propName.c_str(), val.constData());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user