diff --git a/src/App/DocumentPyImp.cpp b/src/App/DocumentPyImp.cpp index 6564432c93..ab13703045 100644 --- a/src/App/DocumentPyImp.cpp +++ b/src/App/DocumentPyImp.cpp @@ -332,7 +332,7 @@ PyObject* DocumentPy::importLinks(PyObject *args) return NULL; // NULL triggers exception std::vector objs; - if(PySequence_Check(obj)) { + if (PySequence_Check(obj)) { Py::Sequence seq(obj); for(size_t i=0;i(seq[i].ptr())->getDocumentObjectPtr()); } - }else if(obj == Py_None) { - }else if(!PyObject_TypeCheck(obj,&DocumentObjectPy::Type)) { + } + else if(obj == Py_None) { + // do nothing here + } + else if(!PyObject_TypeCheck(obj,&DocumentObjectPy::Type)) { PyErr_SetString(PyExc_TypeError, "Expect first argument to be either a document object or sequence of document objects"); return 0; - }else + } + else { objs.push_back(static_cast(obj)->getDocumentObjectPtr()); + } if(objs.empty()) objs = getDocumentPtr()->getObjects(); diff --git a/src/Gui/DlgToolbarsImp.cpp b/src/Gui/DlgToolbarsImp.cpp index 791b644521..2907d254e5 100644 --- a/src/Gui/DlgToolbarsImp.cpp +++ b/src/Gui/DlgToolbarsImp.cpp @@ -900,8 +900,6 @@ void DlgCustomToolbarsImp::moveDownCustomCommand(const QString& name, const QByt void DlgCustomToolbarsImp::changeEvent(QEvent *e) { - if (e->type() == QEvent::LanguageChange) { - } DlgCustomToolbars::changeEvent(e); } diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index 259147be86..bd46c209dc 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -739,6 +739,7 @@ void NavigationStyle::zoom(SoCamera * cam, float diffvalue) // sqrt(FLT_MAX) == ~ 1e+19, which should be both safe for further // calculations and ok for the end-user and app-programmer. if (distorigo > float(sqrt(FLT_MAX))) { + // do nothing here } else { cam->position = newpos; diff --git a/src/Gui/SoFCColorBar.cpp b/src/Gui/SoFCColorBar.cpp index 614841728d..e367cdcb5e 100644 --- a/src/Gui/SoFCColorBar.cpp +++ b/src/Gui/SoFCColorBar.cpp @@ -213,6 +213,7 @@ void SoFCColorBar::eventCallback(void * /*userdata*/, SoEventCallback * node) const SoMouseButtonEvent* e = static_cast(event); if ((e->getButton() == SoMouseButtonEvent::BUTTON2)) { if (e->getState() == SoButtonEvent::UP) { + // do nothing here } } } diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index cbbab73393..b28a1495aa 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -3555,6 +3555,7 @@ void View3DInventorViewer::selectCB(void* viewer, SoPath* path) { ViewProvider* vp = static_cast(viewer)->getViewProviderByPath(path); if (vp && vp->useNewSelectionModel()) { + // do nothing here } } @@ -3562,6 +3563,7 @@ void View3DInventorViewer::deselectCB(void* viewer, SoPath* path) { ViewProvider* vp = static_cast(viewer)->getViewProviderByPath(path); if (vp && vp->useNewSelectionModel()) { + // do nothing here } } diff --git a/src/Mod/Mesh/Gui/MeshEditor.cpp b/src/Mod/Mesh/Gui/MeshEditor.cpp index 10ec7cce52..1343450329 100644 --- a/src/Mod/Mesh/Gui/MeshEditor.cpp +++ b/src/Mod/Mesh/Gui/MeshEditor.cpp @@ -686,9 +686,7 @@ void MeshFillHole::fileHoleCallback(void * ud, SoEventCallback * n) else if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) { n->setHandled(); const SoMouseButtonEvent * mbe = static_cast(ev); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { - } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::UP) { + if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::UP) { if (self->myNumPoints > 1) return; SoRayPickAction rp(view->getSoRenderManager()->getViewportRegion()); diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index de64f18e70..c9589b8b8a 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -978,6 +978,7 @@ bool ViewProviderPartExt::setEdit(int ModNum) void ViewProviderPartExt::unsetEdit(int ModNum) { if (ModNum == ViewProvider::Color) { + // Do nothing here } else { Gui::ViewProviderGeometryObject::unsetEdit(ModNum); diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 77824c8d34..1b31439f0d 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -953,6 +953,7 @@ bool ProfileBased::isEqualGeometry(const TopoDS_Shape& s1, const TopoDS_Shape& s } } else if (s1.ShapeType() == TopAbs_EDGE && s2.ShapeType() == TopAbs_EDGE) { + // Do nothing here } else if (s1.ShapeType() == TopAbs_VERTEX && s2.ShapeType() == TopAbs_VERTEX) { gp_Pnt p1 = BRep_Tool::Pnt(TopoDS::Vertex(s1)); diff --git a/src/Mod/Raytracing/Gui/ViewProvider.cpp b/src/Mod/Raytracing/Gui/ViewProvider.cpp index 81a8023efa..193f456db7 100644 --- a/src/Mod/Raytracing/Gui/ViewProvider.cpp +++ b/src/Mod/Raytracing/Gui/ViewProvider.cpp @@ -114,6 +114,7 @@ bool ViewProviderLux::setEdit(int ModNum) void ViewProviderLux::unsetEdit(int ModNum) { if (ModNum == ViewProvider::Default) { + // Do nothing here } else { ViewProviderDocumentObjectGroup::unsetEdit(ModNum); @@ -192,6 +193,7 @@ bool ViewProviderPovray::setEdit(int ModNum) void ViewProviderPovray::unsetEdit(int ModNum) { if (ModNum == ViewProvider::Default) { + // Do nothing here } else { ViewProviderDocumentObjectGroup::unsetEdit(ModNum); diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 5687ea1a12..c1b8855210 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -2572,15 +2572,18 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point) solve(); return 0; - } else + } else { return -1; + } } else if (theta1 < 0.001*arcLength) { // drop the second intersection point std::swap(GeoId1,GeoId2); std::swap(point1,point2); } else if (theta2 > 0.999*arcLength) { + // Do nothing here } - else + else { return -1; + } } if (GeoId1 >= 0) { @@ -2749,14 +2752,17 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point) solve(); return 0; - } else + } else { return -1; + } } else if (theta1 < 0.001*arcLength) { // drop the second intersection point std::swap(GeoId1,GeoId2); std::swap(point1,point2); } else if (theta2 > 0.999*arcLength) { - } else + // Do nothing here + } else { return -1; + } } if (GeoId1 >= 0) { @@ -2927,14 +2933,17 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point) delete newConstr; return 0; - } else + } else { return -1; + } } else if (theta1 < 0.001*arcLength) { // drop the second intersection point std::swap(GeoId1,GeoId2); std::swap(point1,point2); } else if (theta2 > 0.999*arcLength) { - } else + // Do nothing here + } else { return -1; + } } if (GeoId1 >= 0) { diff --git a/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.cpp b/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.cpp index 878d704d32..96fac9eea9 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.cpp @@ -67,9 +67,9 @@ TaskSketcherCreateCommands::~TaskSketcherCreateCommands() void TaskSketcherCreateCommands::changeEvent(QEvent *e) { TaskBox::changeEvent(e); - if (e->type() == QEvent::LanguageChange) { - //ui->retranslateUi(proxy); - } + //if (e->type() == QEvent::LanguageChange) { + // ui->retranslateUi(proxy); + //} } /// @cond DOXERR