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

@@ -272,7 +272,7 @@ void CmdTechDrawNewView::activated(int iMsg)
if ((shapes.empty()) &&
(groups.empty())) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Can not make a View from this selection"));
QObject::tr("No Shapes or Groups in this selection"));
return;
}
if (!groups.empty()) {
@@ -506,7 +506,7 @@ void CmdTechDrawProjGroup::activated(int iMsg)
if ((shapes.empty()) &&
(groups.empty())) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Can not make a ProjectionGroup from this selection"));
QObject::tr("No Shapes or Groups in this selection"));
return;
}
if (!groups.empty()) {
@@ -612,7 +612,7 @@ bool CmdTechDrawProjGroup::isActive(void)
// std::vector<App::DocumentObject*> shapes = getSelection().getObjectsOfType(App::DocumentObject::getClassTypeId());
// if (shapes.empty()) {
// QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
// QObject::tr("Can not make a MultiView from this selection."));
// QObject::tr("Can not MultiView from this selection."));
// return;
// }