Spreadsheet: Only use validator when when prefix is not '='
This commit is contained in:
@@ -921,15 +921,15 @@ ExpressionLineEdit::ExpressionLineEdit(QWidget* parent,
|
||||
, noProperty(noProperty)
|
||||
, exactMatch(false)
|
||||
, checkInList(checkInList)
|
||||
, checkPrefix(checkPrefix)
|
||||
{
|
||||
setValidator(new ExpressionValidator(this));
|
||||
setPrefix(checkPrefix);
|
||||
connect(this, &QLineEdit::textEdited, this, &ExpressionLineEdit::slotTextChanged);
|
||||
}
|
||||
|
||||
void ExpressionLineEdit::setPrefix(char prefix)
|
||||
{
|
||||
checkPrefix = prefix;
|
||||
setValidator(checkPrefix == '=' ? nullptr : new ExpressionValidator(this));
|
||||
}
|
||||
|
||||
void ExpressionLineEdit::setDocumentObject(const App::DocumentObject* currentDocObj,
|
||||
|
||||
@@ -154,6 +154,8 @@ SheetView::SheetView(Gui::Document* pcDocument, App::DocumentObject* docObj, QWi
|
||||
// Set document object to create auto completer
|
||||
ui->cellContent->setDocumentObject(sheet);
|
||||
ui->cellAlias->setDocumentObject(sheet);
|
||||
|
||||
ui->cellContent->setPrefix('=');
|
||||
}
|
||||
|
||||
SheetView::~SheetView()
|
||||
|
||||
Reference in New Issue
Block a user