From 63a577fe0798bddd8dcc2b1625844a1b64afa600 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Fri, 19 Jul 2019 15:33:02 -0400 Subject: [PATCH] Fix typos in src/Gio --- src/Gui/AxisOrigin.h | 4 ++-- src/Gui/AxisOriginPy.xml | 2 +- src/Gui/Command.h | 2 +- src/Gui/Document.cpp | 8 ++++---- src/Gui/Selection.cpp | 6 +++--- src/Gui/SoFCUnifiedSelection.cpp | 7 +++---- src/Gui/SoFCUnifiedSelection.h | 4 ++-- src/Gui/Tree.cpp | 12 ++++++------ src/Gui/Tree.h | 2 +- src/Gui/View3DInventorViewer.cpp | 8 ++++---- src/Gui/View3DPy.cpp | 6 +++--- src/Gui/View3DViewerPy.cpp | 2 +- src/Gui/ViewProvider.h | 10 +++++----- src/Gui/ViewProviderDragger.cpp | 2 +- src/Gui/ViewProviderLink.cpp | 18 +++++++++--------- src/Gui/ViewProviderLink.h | 2 +- src/Gui/ViewProviderPy.xml | 10 +++++----- src/Mod/Part/App/PartFeature.cpp | 2 +- 18 files changed, 53 insertions(+), 54 deletions(-) diff --git a/src/Gui/AxisOrigin.h b/src/Gui/AxisOrigin.h index b91754476c..0ad2034133 100644 --- a/src/Gui/AxisOrigin.h +++ b/src/Gui/AxisOrigin.h @@ -66,7 +66,7 @@ public: /** Set customized names for axis components * - * @param labels: the input names. Avaiable keys are, O: origin, + * @param labels: the input names. Available keys are, O: origin, * X: x axis, Y: y axis, Z: z axis, XY: XY plane, * XZ: XY plane, YZ: YZ plane * @@ -104,6 +104,6 @@ private: std::map > nodeMap; }; -} // namepsace Gui +} // namespace Gui #endif //GUI_AxisOrigin_H diff --git a/src/Gui/AxisOriginPy.xml b/src/Gui/AxisOriginPy.xml index 9f3d8d7c5a..6b13768008 100644 --- a/src/Gui/AxisOriginPy.xml +++ b/src/Gui/AxisOriginPy.xml @@ -63,7 +63,7 @@ pPath: output coin path leading to the returned element detail -Get/set axis component names as a dictionary. Avaiable keys are, +Get/set axis component names as a dictionary. Available keys are, 'O': origin 'X': x axis 'Y': y axis diff --git a/src/Gui/Command.h b/src/Gui/Command.h index 698ee981c2..02476164a2 100644 --- a/src/Gui/Command.h +++ b/src/Gui/Command.h @@ -46,7 +46,7 @@ * @endcode * * Translates to command (assuming doc's name is 'DocName', and - * and objName constains value 'ObjName'): + * and objName constrains value 'ObjName'): * @code{.py} * Gui.getDocument('DocName').getObject('ObjName') * @endcode diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index adb2ac70d4..9d417ffab0 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -331,7 +331,7 @@ bool Document::setEdit(Gui::ViewProvider* p, int ModNum, const char *subname) // tracking purpose. Because, bringing an unrelated external object to // the current view for editing will confuse user, and is certainly a // bug. By right, the top parent object should always belong to the - // editing document, and the acutally editing sub object can be + // editing document, and the actually editing sub object can be // external. // // So, you can either call setEdit() with subname set to 0, which cause @@ -446,7 +446,7 @@ void Document::_resetEdit(void) // The logic below is not necessary anymore, because this method is // changed into a private one, _resetEdit(). And the exposed // resetEdit() above calls into Application->setEditDocument(0) which - // will prevent recrusive calling. + // will prevent recursive calling. #if 0 // Nullify the member variable before calling finishEditing(). // This is to avoid a possible stack overflow when a view provider wrongly @@ -1490,7 +1490,7 @@ void Document::importObjects(const std::vector& obj, Base: void Document::slotFinishImportObjects(const std::vector &objs) { (void)objs; - // finishRestoring() is now trigged by signalFinishRestoreObject + // finishRestoring() is now triggered by signalFinishRestoreObject // // for(auto obj : objs) { // auto vp = getViewProvider(obj); @@ -2053,7 +2053,7 @@ bool Document::checkTransactionID(bool undo, int iSteps) { "There are grouped transactions in the following documents with " "other preceding transactions")) .arg(QString::fromUtf8(str.str().c_str())) - .arg(QObject::tr("Choose 'Yes' to roll back all preceeding transactions.\n" + .arg(QObject::tr("Choose 'Yes' to roll back all preceding transactions.\n" "Choose 'No' to roll back in the active document only.\n" "Choose 'Abort' to abort")), QMessageBox::Yes|QMessageBox::No|QMessageBox::Abort, QMessageBox::Yes); diff --git a/src/Gui/Selection.cpp b/src/Gui/Selection.cpp index ac72f2c8be..f6c7d5bcbd 100644 --- a/src/Gui/Selection.cpp +++ b/src/Gui/Selection.cpp @@ -1617,7 +1617,7 @@ void SelectionSingleton::slotDeletedObject(const App::DocumentObject& Obj) { if(!Obj.getNameInDocument()) return; - // For safty reason, don't bother checking + // For safety reason, don't bother checking rmvPreselect(); // Remove also from the selection, if selected @@ -1732,13 +1732,13 @@ PyMethodDef SelectionSingleton::Methods[] = { "second argumeht defines the document name. If no document name is given the\n" "currently active document is used"}, {"getSelection", (PyCFunction) SelectionSingleton::sGetSelection, METH_VARARGS, - "getSelection(docName=None,resolve=True,single=False) -- Return a list of selected objets\n" + "getSelection(docName=None,resolve=True,single=False) -- Return a list of selected objects\n" "\ndocName - document name. None means the active document, and '*' means all document" "\nresolve - whether to resolve the subname references." "\n 0: do not resolve, 1: resolve, 2: resolve with element map" "\nsingle - only return if there is only one selection"}, {"getPickedList", (PyCFunction) SelectionSingleton::sGetPickedList, 1, - "getPickedList(docName=None) -- Return a list of objets under the last mouse click\n" + "getPickedList(docName=None) -- Return a list of objects under the last mouse click\n" "\ndocName - document name. None means the active document, and '*' means all document"}, {"enablePickedList", (PyCFunction) SelectionSingleton::sEnablePickedList, METH_VARARGS, "enablePickedList(boolean) -- Enable/disable pick list"}, diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index 28064c2da8..99fcdc47e0 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -1493,8 +1493,8 @@ bool SoFCSelectionRoot::doActionPrivate(Stack &stack, SoAction *action) { // Selection action short-circuit optimization. In case of whole object // selection/pre-selection, we shall store a SelContext keyed by ourself. // And the action traversal can be short-curcuited once the first targeted - // SoFCSelectionRoot is found here. New fuction checkSelection() is exposed - // to check for whole object selection. This greatly imporve performance on + // SoFCSelectionRoot is found here. New function checkSelection() is exposed + // to check for whole object selection. This greatly improve performance on // large group. SelContextPtr ctx2; @@ -1556,7 +1556,7 @@ bool SoFCSelectionRoot::doActionPrivate(Stack &stack, SoAction *action) { if(selAction->getType() == SoSelectionElementAction::None) { if(action->getWhatAppliedTo() == SoAction::NODE) { // Here the 'select none' action is applied to a node, and we - // are the first SoFCSelectionRoot encounted (which means all + // are the first SoFCSelectionRoot encountered (which means all // children stores selection context here, both whole object // and element selection), then we can simply perform the // action by clearing the selection context here, and save the @@ -1751,4 +1751,3 @@ void SoFCPathAnnotation::setPath(SoPath *newPath) { path->ref(); addChild(path->getNode(0)); } - diff --git a/src/Gui/SoFCUnifiedSelection.h b/src/Gui/SoFCUnifiedSelection.h index 2429167e77..43db9756c2 100644 --- a/src/Gui/SoFCUnifiedSelection.h +++ b/src/Gui/SoFCUnifiedSelection.h @@ -236,8 +236,8 @@ public: * @param ctx2: secondary context output * * @return Returned the primary context for selection, and the context is - * always stored in the first encounted SoFCSelectionRoot in the path. It - * is keyed using the entires sequence of SoFCSelectionRoot along the path + * always stored in the first encountered SoFCSelectionRoot in the path. It + * is keyed using the entire sequence of SoFCSelectionRoot along the path * to \c node, replacing the first SoFCSelectionRoot with the given node. * * @return Secondary context returned in \c ctx2 is for customized diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 3d51256b9b..bacb4296db 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -1172,7 +1172,7 @@ void TreeWidget::selectAllLinks(App::DocumentObject *obj) { return; if(!obj || !obj->getNameInDocument()) { - TREE_ERR("invlaid object"); + TREE_ERR("invalid object"); return; } @@ -3257,7 +3257,7 @@ void DocumentItem::populateItem(DocumentObjectItem *item, bool refresh, bool del int i=-1; // iterate through the claimed children, and try to synchronize them with the - // children tree item with the same order of apperance. + // children tree item with the same order of appearance. int childCount = item->childCount(); for(auto child : item->myData->children) { @@ -3938,7 +3938,7 @@ App::DocumentObject *DocumentItem::getTopParent(App::DocumentObject *obj, std::s return obj; for(auto item : it->second->items) { - // non group object do not provide a cooridnate system, hence its + // non group object do not provide a coordinate system, hence its // claimed child is still in the global coordinate space, so the // child can still be considered a top level object if(!item->isParentGroup()) @@ -3987,7 +3987,7 @@ DocumentObjectItem *DocumentItem::findItemByObject( return findItem(sync,it->second->rootItem,subname,select); for(auto item : it->second->items) { - // non group object do not provide a cooridnate system, hence its + // non group object do not provide a coordinate system, hence its // claimed child is still in the global coordinate space, so the // child can still be considered a top level object if(!item->isParentGroup()) @@ -4163,7 +4163,7 @@ void DocumentItem::selectAllInstances(const ViewProviderDocumentObject &vpd) { bool lock = getTree()->blockConnection(true); // We are trying to select all items corresponding to a given view - // provider, i.e. all apperance of the object inside all its parent items + // provider, i.e. all appearance of the object inside all its parent items // // Build a map of object to all its parent for(auto &v : ObjectMap) { @@ -4612,7 +4612,7 @@ bool DocumentObjectItem::requiredAtRoot(bool excludeSelf) const{ if(it!=myOwner->_ParentMap.end()) { // Reaching here means all items of this corresponding object is // going to be deleted, but the object itself is not deleted and - // still being refered to by some parent item that is not expanded + // still being referred to by some parent item that is not expanded // yet. So, we force populate at least one item of the parent // object to make sure that there is at least one corresponding // item for each object. diff --git a/src/Gui/Tree.h b/src/Gui/Tree.h index 48e9f4dc77..d6d5afcefe 100644 --- a/src/Gui/Tree.h +++ b/src/Gui/Tree.h @@ -393,7 +393,7 @@ public: App::DocumentObject *getFullSubName(std::ostringstream &str, DocumentObjectItem *parent = 0) const; - // return the immediate decendent of the common ancestor of this item and + // return the immediate descendent of the common ancestor of this item and // 'cousin'. App::DocumentObject *getRelativeParent( std::ostringstream &str, diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 151b3d73b3..d25de3e9db 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -715,7 +715,7 @@ void View3DInventorViewer::clearGroupOnTop() { action.apply(pcGroupOnTopSel); coinRemoveAllChildren(pcGroupOnTopSel); coinRemoveAllChildren(pcGroupOnTopPreSel); - FC_LOG("clear annoation"); + FC_LOG("clear annotation"); } } @@ -765,9 +765,9 @@ void View3DInventorViewer::checkGroupOnTop(const SelectionChanges &Reason) { action.apply(&tmpPath); tmpPath.unrefNoDelete(); pcGroup->removeChild(index); - FC_LOG("remove annoation " << Reason.Type << " " << key); + FC_LOG("remove annotation " << Reason.Type << " " << key); }else - FC_LOG("remove annoation object " << Reason.Type << " " << key); + FC_LOG("remove annotation object " << Reason.Type << " " << key); objs.erase(it); return; } @@ -881,7 +881,7 @@ void View3DInventorViewer::checkGroupOnTop(const SelectionChanges &Reason) { node->setDetail(det); det = 0; } - FC_LOG("add annoation " << Reason.Type << " " << key); + FC_LOG("add annotation " << Reason.Type << " " << key); objs[key.c_str()] = node; } delete det; diff --git a/src/Gui/View3DPy.cpp b/src/Gui/View3DPy.cpp index fe3079bb40..2d292187af 100644 --- a/src/Gui/View3DPy.cpp +++ b/src/Gui/View3DPy.cpp @@ -186,10 +186,10 @@ void View3DInventorPy::init_type() add_varargs_method("setName",&View3DInventorPy::setName,"setName(str): sets a name to this viewer\nThe name sets the widget's windowTitle and appears on the viewer tab"); add_keyword_method("toggleClippingPlane", &View3DInventorPy::toggleClippingPlane, "toggleClippingPlane(toggle=-1, beforeEditing=False, noManip=True, pla=App.Placement()\n" - "Toggle a golbal clipping plane\n\n" + "Toggle a global clipping plane\n\n" "toggle: -1 toggle, 1 show, 0 hide\n" - "beforeEditing: whether insert the clipping node before or after editing root node\n" - "noManip: wether to create a manipulator\n" + "beforeEditing: whether to insert the clipping node before or after editing root node\n" + "noManip: whether to create a manipulator\n" "pla: clipping plane placement"); } diff --git a/src/Gui/View3DViewerPy.cpp b/src/Gui/View3DViewerPy.cpp index 5ca2fc6bb3..916a1bd577 100644 --- a/src/Gui/View3DViewerPy.cpp +++ b/src/Gui/View3DViewerPy.cpp @@ -80,7 +80,7 @@ void View3DInventorViewerPy::init_type() "setupEditingRoot(matrix=None): setup the editing ViewProvider's root node.\n" "All child coin nodes of the current editing ViewProvider will be transferred to\n" "an internal editing node of this viewer, with a new transformation node specified\n" - "by 'matrix'. All ViewProviderLink to the editing ViewProvider will be temperary\n" + "by 'matrix'. All ViewProviderLink to the editing ViewProvider will be temporary\n" "hidden. Call resetEditingRoot() to restore everything back to normal"); add_varargs_method("resetEditingRoot", &View3DInventorViewerPy::resetEditingRoot, "resetEditingRoot(updateLinks=True): restore the editing ViewProvider's root node"); diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index 9308464365..c4319264c6 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -287,7 +287,7 @@ public: * * @param owner: the (grand)parent object of the dropping object. Maybe * null. This may not be the top parent object, as tree view will try to - * find a parent of the dropping object realtive to this object to avoid + * find a parent of the dropping object relative to this object to avoid * cyclic dependency * * @param subname: subname reference to the dropping object @@ -309,7 +309,7 @@ public: * * @param owner: the (grand)parent object of the dropping object. Maybe * null. This may not be the top parent object, as tree view will try to - * find a parent of the dropping object realtive to this object to avoid + * find a parent of the dropping object relative to this object to avoid * cyclic dependency * * @param subname: subname reference to the dropping object @@ -328,12 +328,12 @@ public: * @param oldObj: object to be replaced * @param newObj: object to replace with * - * @return Returns 0 if not found, 1 if succeed, -1 if not supported + * @return Returns 0 if not found, 1 if succeeded, -1 if not supported */ virtual int replaceObject(App::DocumentObject *oldObj, App::DocumentObject *newObj); //@} - /** Tell the tree view if this object should apear there */ + /** Tell the tree view if this object should appear there */ virtual bool showInTree() const { return true; } /** Tell the tree view to remove children items from the tree root*/ virtual bool canRemoveChildrenFromRoot() const {return true;} @@ -392,7 +392,7 @@ public: const std::string getOverrideMode(); //@} - /** @name Color mangement methods + /** @name Color management methods */ //@{ virtual std::map getElementColors(const char *element=0) const { diff --git a/src/Gui/ViewProviderDragger.cpp b/src/Gui/ViewProviderDragger.cpp index 48f75a161a..179debe59c 100644 --- a/src/Gui/ViewProviderDragger.cpp +++ b/src/Gui/ViewProviderDragger.cpp @@ -120,7 +120,7 @@ ViewProvider *ViewProviderDragger::startEditing(int mode) { bool ViewProviderDragger::checkLink() { // Trying to detect if the editing request is forwarded by a link object, // usually by doubleClicked(). If so, we route the request back. There shall - // be no risk of infinit recursion, as ViewProviderLink handles + // be no risk of infinite recursion, as ViewProviderLink handles // ViewProvider::Transform request by itself. ViewProviderDocumentObject *vpParent = 0; std::string subname; diff --git a/src/Gui/ViewProviderLink.cpp b/src/Gui/ViewProviderLink.cpp index b70e772b1d..b493b764f0 100644 --- a/src/Gui/ViewProviderLink.cpp +++ b/src/Gui/ViewProviderLink.cpp @@ -612,7 +612,7 @@ public: } if(vp->getChildRoot()) { // In case the children is also a geo group, it will visually - // hold all of its own children, so stop going futher down. + // hold all of its own children, so stop going further down. break; } // new style mapped sub-element @@ -1041,7 +1041,7 @@ void LinkView::setTransform(SoTransform *pcTransform, const Base::Matrix4D &mat) dMtrx[8], dMtrx[9], dMtrx[10], dMtrx[11], dMtrx[12],dMtrx[13],dMtrx[14], dMtrx[15])); #else - // extract scale factor from colum vector length + // extract scale factor from column vector length double sx = Base::Vector3d(mat[0][0],mat[1][0],mat[2][0]).Sqr(); double sy = Base::Vector3d(mat[0][1],mat[1][1],mat[2][1]).Sqr(); double sz = Base::Vector3d(mat[0][2],mat[1][2],mat[2][2]).Sqr(); @@ -2432,11 +2432,11 @@ ViewProvider *ViewProviderLink::startEditing(int mode) { return 0; } - // TODO: the 0x8000 mask here is for caller to disambiguate the intension - // here. Whether he wants to, say transform the link itself or the linked - // object. Use a mask here will allow forwarding those editing mode that - // supported by both the link and the linked object, such as transform and - // set color. We need to find a better place to declare this constant. + // TODO: the 0x8000 mask here is for caller to disambiguate the intention + // here, whether he wants to, say transform the link itself or the linked + // object. Use of a mask here will allow forwarding those editing modes that + // are supported by both the link and the linked object, such as transform + // and set color. We need to find a better place to declare this constant. mode &= ~0x8000; auto doc = Application::Instance->editDocument(); @@ -2503,8 +2503,8 @@ void ViewProviderLink::setEditViewer(Gui::View3DInventorViewer* viewer, int ModN group->addChild(pickStyle); group->addChild(pcDragger); - // Because the dragger is not grouped with the actually geometry, - // we use an invisible cube sized by the bound box obtained from + // Because the dragger is not grouped with the actual geometry, + // we use an invisible cube sized by the bounding box obtained from // initDraggingPlacement() to scale the centerball dragger properly auto * ss = (SoSurroundScale*)dragger->getPart("surroundScale", TRUE); diff --git a/src/Gui/ViewProviderLink.h b/src/Gui/ViewProviderLink.h index 9edc486421..03259c80aa 100644 --- a/src/Gui/ViewProviderLink.h +++ b/src/Gui/ViewProviderLink.h @@ -331,7 +331,7 @@ typedef ViewProviderPythonFeatureT ViewProviderLinkPython; } //namespace Gui #ifdef _MSC_VER -// forward decleration to please VC 2013 +// forward declaration to please VC 2013 void intrusive_ptr_add_ref(Gui::LinkInfo *px); void intrusive_ptr_release(Gui::LinkInfo *px); #endif diff --git a/src/Gui/ViewProviderPy.xml b/src/Gui/ViewProviderPy.xml index 7328cf647c..979828f5d1 100644 --- a/src/Gui/ViewProviderPy.xml +++ b/src/Gui/ViewProviderPy.xml @@ -26,7 +26,7 @@ removeProperty(string) -- Remove a generic property. - Note, you can only remove user-defined properties but not built-in ones. + Note, you can only remove user-defined properties, not built-in ones. @@ -86,7 +86,7 @@ Check whether the child object can be removed from other parent and added here b replaceObject(oldObj, newObj) -> Int: replace a child object -Returns 1 if succeed, 0 if not found, -1 if not supported +Returns 1 if succeeded, 0 if not found, -1 if not supported @@ -182,7 +182,7 @@ getBoundingBox(subname=None, transform=True, view=None): obtain the bounding box - A pivy Separator to add a custom scene graph to this ViewProvider + A pivy Separator to add a custom scenegraph to this ViewProvider @@ -218,13 +218,13 @@ getBoundingBox(subname=None, transform=True, view=None): obtain the bounding box - Tells the tree view whether to remvoe the children item from root or not + Tells the tree view whether to remove the children item from root or not - Get/set visiblities of all links to this view object + Get/set visibilities of all links to this view object diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index f687eeed63..b5999be135 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -163,7 +163,7 @@ App::DocumentObject *Feature::getSubObject(const char *subname, bool copy = sCopy?true:false; if(!copy) { // Work around OCC bug on transforming circular edge with an - // offseted surface. The bug probably affect other shape type, + // offsetted surface. The bug probably affect other shape type, // too. TopExp_Explorer exp(ts.getShape(),TopAbs_EDGE); if(exp.More()) {