diff --git a/src/Mod/Draft/draftviewproviders/view_base.py b/src/Mod/Draft/draftviewproviders/view_base.py index 70b187530e..82e1aedc71 100644 --- a/src/Mod/Draft/draftviewproviders/view_base.py +++ b/src/Mod/Draft/draftviewproviders/view_base.py @@ -459,7 +459,6 @@ class ViewProviderDraft(object): return ":/icons/Draft_ShapeString_tree.svg" else: return ":/icons/Draft_Draft.svg" - return ":/icons/Draft_Draft.svg" def claimChildren(self): """Return objects that will be placed under it in the tree view. diff --git a/src/Mod/Import/App/SCL/Part21.py b/src/Mod/Import/App/SCL/Part21.py index e451382138..f2d1ac921a 100644 --- a/src/Mod/Import/App/SCL/Part21.py +++ b/src/Mod/Import/App/SCL/Part21.py @@ -116,8 +116,8 @@ class Part21Parser: # del self._number_of_ancestors[item] def get_schema_name(self): - return self._schema_name print(schema_name) + return self._schema_name def get_number_of_instances(self): return len(list(self._instances_definition.keys())) diff --git a/src/Mod/Part/App/GeometrySurfacePyImp.cpp b/src/Mod/Part/App/GeometrySurfacePyImp.cpp index 832c62fef0..f141766ece 100644 --- a/src/Mod/Part/App/GeometrySurfacePyImp.cpp +++ b/src/Mod/Part/App/GeometrySurfacePyImp.cpp @@ -487,9 +487,6 @@ PyObject* GeometrySurfacePy::projectPoint(PyObject *args, PyObject* kwds) PyErr_SetString(PartExceptionOCCError, e.GetMessageString()); return nullptr; } - - PyErr_SetString(PartExceptionOCCError, "Geometry is not a surface"); - return nullptr; } PyObject* GeometrySurfacePy::isUmbillic(PyObject *args) diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.cpp b/src/Mod/Part/Gui/SoBrepFaceSet.cpp index 8c0c17c977..abe40f5297 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.cpp +++ b/src/Mod/Part/Gui/SoBrepFaceSet.cpp @@ -136,7 +136,7 @@ public: const int32_t *texindices, const int nbind, const int mbind, - const int texture); + SbBool texture); static void context_destruction_cb(uint32_t context, void * userdata) { @@ -1285,7 +1285,7 @@ void SoBrepFaceSet::renderHighlight(SoGLRenderAction *action, SelContextPtr ctx) doTextures = false; renderShape(action, false, static_cast(coords), &(cindices[start]), length, - &(pindices[id]), 1, normals, nindices, &mb, mindices, &tb, tindices, nbind, mbind, doTextures?1:0); + &(pindices[id]), 1, normals, nindices, &mb, mindices, &tb, tindices, nbind, mbind, doTextures); } state->pop(); @@ -1384,7 +1384,7 @@ void SoBrepFaceSet::renderSelection(SoGLRenderAction *action, SelContextPtr ctx, renderShape(action, false, static_cast(coords), &(cindices[start]), length, &(pindices[id]), numparts, normals_s, nindices_s, &mb, mindices, &tb, tindices, nbind, mbind, doTextures?1:0); } - if(push) { + if (push) { state->pop(); // SoCacheElement::invalidate(state); } @@ -1407,7 +1407,7 @@ void SoBrepFaceSet::VBO::render(SoGLRenderAction * action, const int32_t *texindices, const int nbind, const int mbind, - const int texture) + SbBool texture) { (void)texcoords; (void)texindices; (void)texture; const SbVec3f * coords3d = NULL; @@ -1736,7 +1736,7 @@ void SoBrepFaceSet::renderShape(SoGLRenderAction * action, const int32_t *texindices, const int nbind, const int mbind, - const int texture) + SbBool texture) { // Can we use vertex buffer objects? if (hasVBO) { diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.h b/src/Mod/Part/Gui/SoBrepFaceSet.h index fab4b94cb7..749423fd68 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.h +++ b/src/Mod/Part/Gui/SoBrepFaceSet.h @@ -128,7 +128,7 @@ private: const int32_t *texindices, const int nbind, const int mbind, - const int texture); + SbBool texture); typedef Gui::SoFCSelectionContextEx SelContext; typedef Gui::SoFCSelectionContextExPtr SelContextPtr; diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index cd490c36cb..39ca708272 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -1122,8 +1122,9 @@ void prepareProfileBased(PartDesign::Body *pcActiveBody, Gui::Command* cmd, cons Gui::Selection().clearSelection(); pickDlg = new PartDesignGui::TaskDlgFeaturePick(sketches, status, accepter, sketch_worker); - if (!bNoSketchWasSelected && extReference) - pickDlg->showExternal(true); + // Logically dead code because 'bNoSketchWasSelected' must be true + //if (!bNoSketchWasSelected && extReference) + // pickDlg->showExternal(true); Gui::Control().showDialog(pickDlg); } diff --git a/src/Mod/PartDesign/Gui/ReferenceSelection.cpp b/src/Mod/PartDesign/Gui/ReferenceSelection.cpp index 4aa28501fc..ee4ab46526 100644 --- a/src/Mod/PartDesign/Gui/ReferenceSelection.cpp +++ b/src/Mod/PartDesign/Gui/ReferenceSelection.cpp @@ -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()); diff --git a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp index d7483d2b1a..4ca161c820 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherTools.cpp @@ -1566,8 +1566,6 @@ void CmdSketcherCompCopy::activated(int iMsg) sc.activate(); pcAction->setShortcut(QString::fromLatin1("")); } - else - return; } Gui::Action * CmdSketcherCompCopy::createAction(void)