MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / tryGetSubViewProvider

Method tryGetSubViewProvider

src/Gui/Document.cpp:214–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 }
213
214 ViewProviderDocumentObject* tryGetSubViewProvider(
215 ViewProviderDocumentObject* vp,
216 App::DocumentObject* obj,
217 App::DocumentObject* sobj
218 ) const
219 {
220 auto svp = vp;
221 if (sobj != obj) {
222 svp = freecad_cast<ViewProviderDocumentObject*>(
223 Application::Instance->getViewProvider(sobj)
224 );
225 if (!svp) {
226 std::stringstream str;
227 str << "Cannot edit '" << sobj->getFullName() << "' without view provider";
228 throw Base::RuntimeError(str.str());
229 }
230 }
231
232 return svp;
233 }
234
235 void setParentViewProvider(ViewProviderDocumentObject* vp)
236 {

Callers

nothing calls this directly

Calls 3

getViewProviderMethod · 0.45
getFullNameMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected