From 6b915fbc4cf69f747360bf1768d8ef9f671842b1 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 47564c21b69c3..8aeebaa619bb2 100644 --- a/src/Gui/DlgAddPropertyVarSet.cpp +++ b/src/Gui/DlgAddPropertyVarSet.cpp @@ -386,9 +386,10 @@ class CreatePropertyException : public std::exception { 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, \n" + "underscore, and must not start with a digit.")); clearEditors(!CLEAR_NAME); throw CreatePropertyException("Invalid name"); }