don't allow to set empty list of bodies for boolean operations

don't update the body feature if boolean body list is empty
This commit is contained in:
wmayer
2018-03-15 12:05:13 +01:00
parent 03ce0f276e
commit bbbbf6c691
2 changed files with 16 additions and 3 deletions

View File

@@ -322,6 +322,11 @@ bool TaskDlgBooleanParameters::accept()
try {
std::vector<std::string> bodies = parameter->getBodies();
if (bodies.empty()) {
QMessageBox::warning(parameter, tr("Empty body list"),
tr("The body list cannot be empty"));
return false;
}
std::stringstream str;
str << "App.ActiveDocument." << name.c_str() << ".setObjects( [";
for (std::vector<std::string>::const_iterator it = bodies.begin(); it != bodies.end(); ++it)