mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-10 01:13:49 +00:00
Remove app::UIContext::countViewsOf()
This commit is contained in:
parent
11abb11f9b
commit
6d107734f8
@ -107,22 +107,6 @@ void UIContext::setActiveView(DocumentView* docView)
|
||||
m_lastSelectedView = docView;
|
||||
}
|
||||
|
||||
size_t UIContext::countViewsOf(Document* document) const
|
||||
{
|
||||
Workspace* workspace = App::instance()->getMainWindow()->getWorkspace();
|
||||
size_t counter = 0;
|
||||
|
||||
for (auto view : *workspace) {
|
||||
if (DocumentView* docView = dynamic_cast<DocumentView*>(view)) {
|
||||
if (docView->getDocument() == document) {
|
||||
++counter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return counter;
|
||||
}
|
||||
|
||||
DocumentView* UIContext::getFirstDocumentView(Document* document) const
|
||||
{
|
||||
Workspace* workspace = App::instance()->getMainWindow()->getWorkspace();
|
||||
|
@ -30,9 +30,6 @@ namespace app {
|
||||
DocumentView* activeView() const;
|
||||
void setActiveView(DocumentView* documentView);
|
||||
|
||||
// Returns the number of views that the given document has.
|
||||
size_t countViewsOf(Document* document) const;
|
||||
|
||||
DocumentView* getFirstDocumentView(Document* document) const;
|
||||
|
||||
// Returns the current editor. It can be null.
|
||||
|
Loading…
x
Reference in New Issue
Block a user