From bb66de4739d3859c30bfae462668110cfb05479b Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 24 Sep 2024 22:31:18 -0400 Subject: [PATCH] Gui: Remove newline from dialog string This commit removes superflous newline that disrupts the flow of the sentence displayed in the VarSet dialog. See #16776 --- src/Gui/DlgAddPropertyVarSet.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Gui/DlgAddPropertyVarSet.cpp b/src/Gui/DlgAddPropertyVarSet.cpp index b1ca96d634..702c996ada 100644 --- a/src/Gui/DlgAddPropertyVarSet.cpp +++ b/src/Gui/DlgAddPropertyVarSet.cpp @@ -398,9 +398,10 @@ private: void DlgAddPropertyVarSet::checkName() { std::string name = ui->lineEditName->text().toStdString(); if(name.empty() || name != Base::Tools::getIdentifier(name)) { - critical(QObject::tr("Invalid name"), - QObject::tr("The property name must only contain alpha numericals,\n" - "underscore, and must not start with a digit.")); + QMessageBox::critical(getMainWindow(), + QObject::tr("Invalid name"), + QObject::tr("The property name must only contain alpha numericals, " + "underscore, and must not start with a digit.")); clearEditors(!CLEAR_NAME); throw CreatePropertyException("Invalid name"); }