| 204 | } |
| 205 | |
| 206 | void 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 | |
| 225 | QRectF DrawViewCollection::getRect() const |
| 226 | { |
nothing calls this directly
no test coverage detected