Coverity: Structurally/Logically dead code
This commit is contained in:
@@ -217,10 +217,7 @@ void getReferencedSelection(const App::DocumentObject* thisObj, const Gui::Selec
|
||||
bool originfeature = selObj->isDerivedFrom(App::OriginFeature::getClassTypeId());
|
||||
if (!originfeature && body) {
|
||||
PartDesign::Body* selBody = PartDesignGui::getBodyFor(selObj, false);
|
||||
if(!selBody || body != selBody) {
|
||||
|
||||
auto* pcActivePart = PartDesignGui::getPartFor(body, false);
|
||||
|
||||
if (!selBody || body != selBody) {
|
||||
QDialog dia(Gui::getMainWindow());
|
||||
Ui_DlgReference dlg;
|
||||
dlg.setupUi(&dia);
|
||||
@@ -230,14 +227,11 @@ void getReferencedSelection(const App::DocumentObject* thisObj, const Gui::Selec
|
||||
selObj = NULL;
|
||||
return;
|
||||
}
|
||||
else if(!dlg.radioXRef->isChecked()) {
|
||||
else if (!dlg.radioXRef->isChecked()) {
|
||||
App::Document* document = thisObj->getDocument();
|
||||
document->openTransaction("Make copy");
|
||||
auto copy = PartDesignGui::TaskFeaturePick::makeCopy(selObj, subname, dlg.radioIndependent->isChecked());
|
||||
if (body)
|
||||
body->addObject(copy);
|
||||
else if (pcActivePart)
|
||||
pcActivePart->addObject(copy);
|
||||
body->addObject(copy);
|
||||
|
||||
selObj = copy;
|
||||
subname.erase(std::remove_if(subname.begin(), subname.end(), &isdigit), subname.end());
|
||||
|
||||
Reference in New Issue
Block a user