Skip to content

Commit

Permalink
No real changes, just restrict wxMacEditHelper interface.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vadz committed Oct 18, 2013
1 parent 7915eea commit 8750905
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/osx/cocoa/textctrl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ - (void)setSelectable:(BOOL)flag;
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 ;
Expand Down Expand Up @@ -334,7 +338,7 @@ - (void)textDidEndEditing:(NSNotification *)aNotification
{
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
Expand Down

0 comments on commit 8750905

Please sign in to comment.