Gui: Use isBad() instead of comparing types with ==

This commit is contained in:
Benjamin Nauck
2025-02-13 20:34:38 +01:00
parent b27559a83a
commit be2c9c99af
5 changed files with 10 additions and 10 deletions

View File

@@ -441,7 +441,7 @@ void DlgAddPropertyVarSet::checkGroup() {
void DlgAddPropertyVarSet::checkType() {
std::string type = ui->comboBoxType->currentText().toStdString();
if (Base::Type::fromName(type.c_str()) == Base::Type::badType()) {
if (Base::Type::fromName(type.c_str()).isBad()) {
throw CreatePropertyException("Invalid name");
}
}