Better error messages for bad selections

This commit is contained in:
wandererfan
2018-09-23 15:47:38 -04:00
committed by wmayer
parent f9b9de42dd
commit df0eb076a6
3 changed files with 11 additions and 11 deletions

View File

@@ -379,13 +379,13 @@ bool _checkSelectionHatch(Gui::Command* cmd) {
const std::vector<std::string> &SubNames = selection[0].getSubNames();
if (SubNames.empty()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
QObject::tr("Can't make a Hatched area from this selection"));
QObject::tr("No Faces to hatch in this selection"));
return false;
}
std::string gType = TechDraw::DrawUtil::getGeomTypeFromName(SubNames.at(0));
if (!(gType == "Face")) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Incorrect Selection"),
QObject::tr("No Face in this selection"));
QObject::tr("No Faces to hatch in this selection"));
return false;
}