don't fall back to the only currently existing document in wxDocManager::GetCurrentView() as it breaks activation logic (#9518)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -417,7 +417,7 @@ public:
|
||||
// Views or windows should inform the document manager
|
||||
// when a view is going in or out of focus
|
||||
virtual void ActivateView(wxView *view, bool activate = true);
|
||||
virtual wxView *GetCurrentView() const;
|
||||
virtual wxView *GetCurrentView() const { return m_currentView; }
|
||||
|
||||
wxList& GetDocuments() { return m_docs; }
|
||||
wxList& GetTemplates() { return m_templates; }
|
||||
@@ -472,6 +472,11 @@ protected:
|
||||
// return the command processor for the current document, if any
|
||||
wxCommandProcessor *GetCurrentCommandProcessor() const;
|
||||
|
||||
// this method tries to find an active view harder than GetCurrentView():
|
||||
// if the latter is NULL, it also checks if we don't have just a single
|
||||
// view and returns it then
|
||||
wxView *GetActiveView() const;
|
||||
|
||||
|
||||
int m_defaultDocumentNameCounter;
|
||||
int m_maxDocsOpen;
|
||||
|
Reference in New Issue
Block a user