no body allowed as body base feature
This commit is contained in:
parent
7cd20adc9a
commit
a6c8f38cf0
|
@ -142,10 +142,18 @@ void CmdPartDesignBody::activated(int iMsg)
|
|||
baseFeature = features[0];
|
||||
if ( baseFeature->isDerivedFrom ( PartDesign::Feature::getClassTypeId() ) &&
|
||||
PartDesign::Body::findBodyOf ( baseFeature ) ) {
|
||||
// Prevent creatung bodies based on features already belonging to other bodies
|
||||
// Prevent creating bodies based on features already belonging to other bodies
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Bad base feature"),
|
||||
QObject::tr("Body can't be based on a PartDesign feature."));
|
||||
return;
|
||||
baseFeature = nullptr;
|
||||
|
||||
}
|
||||
|
||||
if ( baseFeature->isDerivedFrom ( Part::BodyBase::getClassTypeId() ) ) {
|
||||
// Prevent creating bodies based on bodies
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Bad base feature"),
|
||||
QObject::tr("Body can't be based on annother body."));
|
||||
baseFeature = nullptr;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user