Gui: Minor cleanups.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -439,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.
|
||||
@@ -447,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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user