MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / onRemoveDocument

Method onRemoveDocument

src/app/ui_context.cpp:207–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void UIContext::onRemoveDocument(doc::Document* doc)
208{
209 if (doc == m_lastSelectedDoc)
210 m_lastSelectedDoc = nullptr;
211
212 // We don't destroy views in batch mode.
213 if (isUIAvailable()) {
214 Workspace* workspace = App::instance()->workspace();
215
216 for (DocumentView* docView : getAllDocumentViews(doc)) {
217 workspace->removeView(docView);
218 delete docView;
219 }
220 }
221}
222
223void UIContext::onGetActiveSite(Site* site) const
224{

Callers

nothing calls this directly

Calls 3

instanceFunction · 0.85
workspaceMethod · 0.80
removeViewMethod · 0.45

Tested by

no test coverage detected