[TD]allow delete of dependents on delete of parent
- deleting a dvp will now delete any hatches, dimensions or balloons belonging to it. - deleting a dvp that is the base view for a section or detail is still blocked.
This commit is contained in:
@@ -314,17 +314,10 @@ bool ViewProviderViewPart::onDelete(const std::vector<std::string> &)
|
||||
// get child views
|
||||
auto viewSection = getViewObject()->getSectionRefs();
|
||||
auto viewDetail = getViewObject()->getDetailRefs();
|
||||
auto viewLeader = getViewObject()->getLeaders();
|
||||
auto viewDimension = getViewObject()->getDimensions();
|
||||
auto viewBalloon = getViewObject()->getBalloons();
|
||||
|
||||
if (!viewDimension.empty() ||
|
||||
!viewBalloon.empty() ||
|
||||
!viewSection.empty() ||
|
||||
!viewDetail.empty() ||
|
||||
!viewLeader.empty()) {
|
||||
if (!viewSection.empty() || !viewDetail.empty()) {
|
||||
bodyMessageStream << qApp->translate("Std_Delete",
|
||||
"You cannot delete this view because it has one or more dependent objects that would become broken.");
|
||||
"You cannot delete this view because it has one or more dependent views that would become broken.");
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
qApp->translate("Std_Delete", "Object dependencies"), bodyMessage,
|
||||
QMessageBox::Ok);
|
||||
|
||||
Reference in New Issue
Block a user