From 8750905b8bc3af44dcf414b6bfda302acc836fd0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 18 Oct 2013 18:15:25 +0000 Subject: [PATCH] No real changes, just restrict wxMacEditHelper interface. There is no need to provide GetCurrentlyEditedView() when a simpler IsCurrentlyEditedView() suffices. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/textctrl.mm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 6c38fdf74f..16f9291271 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -89,8 +89,12 @@ public : ms_viewCurrentlyEdited = m_viewPreviouslyEdited; } - // Returns the last view we were instantiated for or NULL. - static NSView *GetCurrentlyEditedView() { return ms_viewCurrentlyEdited; } + // Returns true if this view is the one currently being changed by the + // program. + static bool IsCurrentlyEditedView(NSView* v) + { + return v == ms_viewCurrentlyEdited; + } protected : BOOL m_formerEditable ; @@ -334,7 +338,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; { wxUnusedVar(aNotification); - if ( self == wxMacEditHelper::GetCurrentlyEditedView() ) + if ( wxMacEditHelper::IsCurrentlyEditedView(self) ) { // This notification is generated as the result of calling our own // wxTextCtrl method (e.g. WriteText()) and doesn't correspond to any