diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp index 2bdc54ccff..41f592e4b8 100644 --- a/src/Base/Interpreter.cpp +++ b/src/Base/Interpreter.cpp @@ -557,7 +557,7 @@ const char* InterpreterSingleton::init(int argc, char* argv[]) PyRun_SimpleString( "# Check for virtualenv, and activate if present.\n" "# See " - "https://virtualenv.pypa.io/en/latest/userguide/" + "https://virtualenv.pypa.io/en/latest/" "#using-virtualenv-without-bin-python\n" "import os\n" "import sys\n" diff --git a/src/Gui/Selection/Selection.h b/src/Gui/Selection/Selection.h index f5e0154204..49975458b1 100644 --- a/src/Gui/Selection/Selection.h +++ b/src/Gui/Selection/Selection.h @@ -185,33 +185,7 @@ public: const SelectionChanges *pOriginalMsg = nullptr; }; -} //namespace Gui - - - -// Export an instance of the base class (to avoid warning C4275, see also -// C++ Language Reference/General Rules and Limitations on MSDN for more details.) -// -// For compiler gcc4.1 we need to define the template class outside namespace 'Gui' -// otherwise we get the compiler error: -// 'explicit instantiation of 'class Base::Subject' -// in namespace 'Gui' (which does not enclose namespace 'Base') -// -// It seems that this construct is not longer needed for gcc4.4 and even leads to -// errors under Mac OS X. Thus, we check for version between 4.1 and 4.4. -// It seems that for Mac OS X this can be completely ignored - -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(FC_OS_MACOSX) -#define GNUC_VERSION (((__GNUC__)<<16)+((__GNUC_MINOR__)<<8)) -#if GNUC_VERSION >= 0x040100 && GNUC_VERSION < 0x040400 -template class GuiExport Base::Subject; -#endif -#undef GNUC_VERSION -#endif - -namespace Gui -{ - class ViewProviderDocumentObject; +class ViewProviderDocumentObject; /** * The SelectionObserver class simplifies the step to write classes that listen @@ -465,7 +439,7 @@ public: * * @param pDocName: document name. If no document name is given the objects * of the active are returned. If nothing for this Document is selected an - * empty vector is returned. If document name is "*", then all document is + * empty vector is returned. If document name is "*", then all documents are * considered. * @param typeId: specify the type of object to be returned. * @param resolve: sub-object resolving mode. @@ -473,7 +447,7 @@ public: * 1 resolve sub-object with old style element name * 2 resolve sub-object with new style element name * @param single: if set to true, then it will return an empty vector if - * there is more than one selections. + * there is more than one selection. * * @return The returned vector reflects the sequence of selection. */ diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 97731c14c8..7c0d4344f5 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -486,8 +486,6 @@ void View3DInventorViewer::init() // increase refcount before passing it to setScenegraph(), to avoid // premature destruction pcViewProviderRoot->ref(); - // is not really working with Coin3D. - //redrawOverlayOnSelectionChange(pcSelection); setSceneGraph(pcViewProviderRoot); // Event callback node pEventCallback = new SoEventCallback(); @@ -810,7 +808,7 @@ bool View3DInventorViewer::searchNode(SoNode* node) const searchAction.setInterest(SoSearchAction::FIRST); searchAction.apply(this->getSceneGraph()); SoPath* selectionPath = searchAction.getPath(); - return selectionPath ? true : false; + return selectionPath != nullptr; } bool View3DInventorViewer::hasViewProvider(ViewProvider* pcProvider) const diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index 6609d809af..33abc679ae 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -96,10 +96,10 @@ ViewProvider::ViewProvider() setStatus(UpdateData, true); - // SoFCSeparater and SoFCSelectionRoot can both track render cache setting. + // SoFCSeparator and SoFCSelectionRoot can both track render cache setting. // We change to SoFCSelectionRoot so that we can dynamically change full // selection mode (full highlight vs. boundbox). Note that comparing to - // SoFCSeparater, there are some small overhead with SoFCSelectionRoot for + // SoFCSeparator, there are some small overhead with SoFCSelectionRoot for // selection context tracking. // // pcRoot = new SoFCSeparator(true); @@ -906,6 +906,7 @@ std::vector< App::DocumentObject* > ViewProvider::claimChildren3D() const } return vec; } + bool ViewProvider::getElementPicked(const SoPickedPoint *pp, std::string &subname) const { if(!isSelectable()) return false; diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index c49c5a12eb..dc3ef78959 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -178,7 +178,7 @@ public: * @param append: If true, pPath will be first appended with the root node and * the mode switch node of this view provider. * - * @return the coint detail of the subelement + * @return the coin detail of the subelement * * If this view provider links to other view provider, then the * implementation of getDetailPath() shall also append all intermediate diff --git a/src/Gui/ViewProviderExtension.h b/src/Gui/ViewProviderExtension.h index 931b4dd534..728acfec11 100644 --- a/src/Gui/ViewProviderExtension.h +++ b/src/Gui/ViewProviderExtension.h @@ -48,8 +48,7 @@ class ViewProviderDocumentObject; */ class GuiExport ViewProviderExtension : public App::Extension { - - //The cass does not have properties itself, but it is important to provide the property access + //The class does not have properties itself, but it is important to provide the property access //functions. EXTENSION_PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderExtension); @@ -124,7 +123,6 @@ public: private: bool m_ignoreOverlayIcon = false; - //Gui::ViewProviderDocumentObject* m_viewBase = nullptr; }; } //Gui diff --git a/src/Gui/ViewProviderLink.cpp b/src/Gui/ViewProviderLink.cpp index 55bdedd656..63857efd54 100644 --- a/src/Gui/ViewProviderLink.cpp +++ b/src/Gui/ViewProviderLink.cpp @@ -283,7 +283,7 @@ public: continue; int count = pcSwitches[i]->getNumChildren(); if((index<0 && i==LinkView::SnapshotChild) || !count) - pcSwitches[i]->whichChild = -1; + pcSwitches[i]->whichChild = SO_SWITCH_NONE; else if(count>pcLinked->getDefaultMode()) pcSwitches[i]->whichChild = pcLinked->getDefaultMode(); else @@ -313,12 +313,8 @@ public: } } - // VC2013 has trouble with template argument dependent lookup in + // MSVC has trouble with template argument dependent lookup in // namespace. Have to put the below functions in global namespace. - // - // However, gcc seems to behave the opposite, hence the conditional - // compilation here. - // #if defined(_MSC_VER) friend void Gui::intrusive_ptr_add_ref(LinkInfo *px); friend void Gui::intrusive_ptr_release(LinkInfo *px); @@ -334,7 +330,7 @@ public: for(int idx : indices) { if(!pcSwitches[idx]) continue; - if(pcSwitches[idx]->whichChild.getValue()==-1) + if(pcSwitches[idx]->whichChild.getValue()==SO_SWITCH_NONE) return false; } return true; @@ -348,7 +344,7 @@ public: if(!pcSwitches[idx]) continue; if(!visible) - pcSwitches[idx]->whichChild = -1; + pcSwitches[idx]->whichChild = SO_SWITCH_NONE; else if(pcSwitches[idx]->getNumChildren()>pcLinked->getDefaultMode()) pcSwitches[idx]->whichChild = pcLinked->getDefaultMode(); } @@ -389,7 +385,7 @@ public: pcLinkedSwitch.reset(); coinRemoveAllChildren(pcSnapshot); - pcModeSwitch->whichChild = -1; + pcModeSwitch->whichChild = SO_SWITCH_NONE; coinRemoveAllChildren(pcModeSwitch); SoSwitch *pcUpdateSwitch = pcModeSwitch; @@ -1142,7 +1138,7 @@ void LinkView::setChildren(const std::vector &children, auto &info = *nodeArray[i]; info.isGroup = false; info.groupIndex = -1; - info.pcSwitch->whichChild = (vis.size()<=i||vis[i])?0:-1; + info.pcSwitch->whichChild = (vis.size()<=i||vis[i])?0:SO_SWITCH_NONE; info.link(obj); if(obj->hasExtension(App::GroupExtension::getExtensionClassTypeId(),false)) { info.isGroup = true; @@ -1193,7 +1189,7 @@ void LinkView::setTransform(int index, const Base::Matrix4D &mat) { void LinkView::setElementVisible(int idx, bool visible) { if(idx>=0 && idx<(int)nodeArray.size()) - nodeArray[idx]->pcSwitch->whichChild = visible?0:-1; + nodeArray[idx]->pcSwitch->whichChild = visible?0:SO_SWITCH_NONE; } bool LinkView::isElementVisible(int idx) const { diff --git a/src/Gui/ViewProviderLink.h b/src/Gui/ViewProviderLink.h index 1d8f3e1b23..c61fb19420 100644 --- a/src/Gui/ViewProviderLink.h +++ b/src/Gui/ViewProviderLink.h @@ -41,7 +41,7 @@ class LinkInfo; using LinkInfoPtr = boost::intrusive_ptr; #if defined(_MSC_VER) -// forward declaration to please VC 2013 +// forward declaration to please MSVC void intrusive_ptr_add_ref(Gui::LinkInfo *px); void intrusive_ptr_release(Gui::LinkInfo *px); #endif diff --git a/src/Mod/BIM/ArchBuildingPart.py b/src/Mod/BIM/ArchBuildingPart.py index 421f7355c6..9d4f9521fe 100644 --- a/src/Mod/BIM/ArchBuildingPart.py +++ b/src/Mod/BIM/ArchBuildingPart.py @@ -428,7 +428,6 @@ class ViewProviderBuildingPart: def __init__(self,vobj): vobj.addExtension("Gui::ViewProviderGroupExtensionPython") - #vobj.addExtension("Gui::ViewProviderGeoFeatureGroupExtensionPython") vobj.Proxy = self self.setProperties(vobj) vobj.ShapeColor = ArchCommands.getDefaultColor("Helpers") diff --git a/src/Mod/BIM/bimcommands/BimViews.py b/src/Mod/BIM/bimcommands/BimViews.py index 4b3fc36828..6ef5a47d67 100644 --- a/src/Mod/BIM/bimcommands/BimViews.py +++ b/src/Mod/BIM/bimcommands/BimViews.py @@ -292,7 +292,7 @@ class BIM_Views: top.addChild(i) vm.viewtree.addTopLevelItem(top) - # set TreeVinew Item selected if obj is selected + # set TreeView Item selected if obj is selected bold = QtGui.QFont() bold.setBold(True) objSelected = FreeCADGui.Selection.getSelection() diff --git a/src/Mod/Draft/draftguitools/gui_trackers.py b/src/Mod/Draft/draftguitools/gui_trackers.py index aeca0569b2..1ce39fd681 100644 --- a/src/Mod/Draft/draftguitools/gui_trackers.py +++ b/src/Mod/Draft/draftguitools/gui_trackers.py @@ -1446,7 +1446,7 @@ class boxTracker(Tracker): class radiusTracker(Tracker): - """A tracker that displays a transparent sphere to inicate a radius.""" + """A tracker that displays a transparent sphere to indicate a radius.""" def __init__(self, position=FreeCAD.Vector(0, 0, 0), radius=1): self.trans = coin.SoTransform()