[TD] add missing check for leader line in ProjGroup
see https://forum.freecadweb.org/viewtopic.php?f=35&t=43115&start=10#p374279 - also uniform line endings in ViewProviderWeld.cpp
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <QMessageBox>
|
||||
# include <QMessageBox>
|
||||
# include <QTextStream>
|
||||
#endif
|
||||
|
||||
@@ -188,26 +188,26 @@ double ViewProviderWeld::prefTileTextAdjust(void)
|
||||
return adjust;
|
||||
}
|
||||
|
||||
bool ViewProviderWeld::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// a weld cannot be deleted if it has a tile
|
||||
|
||||
bool ViewProviderWeld::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// a weld cannot be deleted if it has a tile
|
||||
|
||||
// get childs
|
||||
auto childs = claimChildren();
|
||||
|
||||
if (!childs.empty()) {
|
||||
QString bodyMessage;
|
||||
QTextStream bodyMessageStream(&bodyMessage);
|
||||
bodyMessageStream << qApp->translate("Std_Delete",
|
||||
"You cannot delete this weld symbol because\n it has a tile weld that would become broken.");
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
qApp->translate("Std_Delete", "Object dependencies"), bodyMessage,
|
||||
QMessageBox::Ok);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!childs.empty()) {
|
||||
QString bodyMessage;
|
||||
QTextStream bodyMessageStream(&bodyMessage);
|
||||
bodyMessageStream << qApp->translate("Std_Delete",
|
||||
"You cannot delete this weld symbol because\n it has a tile weld that would become broken.");
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
qApp->translate("Std_Delete", "Object dependencies"), bodyMessage,
|
||||
QMessageBox::Ok);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewProviderWeld::canDelete(App::DocumentObject *obj) const
|
||||
|
||||
Reference in New Issue
Block a user