Spreadsheet: Only use validator when when prefix is not '='

This commit is contained in:
Benjamin Nauck
2025-06-23 16:14:35 +02:00
parent a39c44e483
commit 4fcb871b5b
2 changed files with 4 additions and 2 deletions

View File

@@ -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,

View File

@@ -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()