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

Method unsetupObject

src/Mod/TechDraw/App/DrawViewCollection.cpp:206–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206void DrawViewCollection::unsetupObject()
207{
208 nowUnsetting = true;
209
210 // Remove the collection's views from document
211 std::string docName = getDocument()->getName();
212
213 for (auto* view : Views.getValues()) {
214 if (view->isAttachedToDocument()) {
215 std::string viewName = view->getNameInDocument();
216 Base::Interpreter().runStringArg("App.getDocument(\"%s\").removeObject(\"%s\")",
217 docName.c_str(), viewName.c_str());
218 }
219 }
220
221 std::vector<App::DocumentObject*> emptyViews;
222 Views.setValues(emptyViews);
223}
224
225QRectF DrawViewCollection::getRect() const
226{

Callers

nothing calls this directly

Calls 8

runStringArgMethod · 0.80
getDocumentFunction · 0.70
getNameMethod · 0.45
getValuesMethod · 0.45
isAttachedToDocumentMethod · 0.45
getNameInDocumentMethod · 0.45
c_strMethod · 0.45
setValuesMethod · 0.45

Tested by

no test coverage detected