guarded frame setting when window is deleted

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-11-19 21:35:09 +00:00
parent dd8838213d
commit 24affeb7e1
2 changed files with 12 additions and 2 deletions

View File

@@ -1542,7 +1542,9 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
key == WXK_DELETE ||
key == WXK_BACK)
{
long t1 = 0xDEADBEEF ;
wxCommandEvent event1(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
long t2 = 0xDEADBEEF ;
event1.SetString( GetValue() ) ;
event1.SetEventObject( this );
wxPostEvent(GetEventHandler(),event1);
@@ -1570,7 +1572,10 @@ bool wxTextCtrl::Show(bool show)
bool retval = wxControl::Show( show ) ;
if ( former != m_macControlIsShown )
WindowRef window = (WindowRef) MacGetRootWindow() ;
wxWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( former != m_macControlIsShown && win!=NULL && !win->IsBeingDeleted() )
{
if ( m_macControlIsShown )
TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left,

View File

@@ -1542,7 +1542,9 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
key == WXK_DELETE ||
key == WXK_BACK)
{
long t1 = 0xDEADBEEF ;
wxCommandEvent event1(wxEVT_COMMAND_TEXT_UPDATED, m_windowId);
long t2 = 0xDEADBEEF ;
event1.SetString( GetValue() ) ;
event1.SetEventObject( this );
wxPostEvent(GetEventHandler(),event1);
@@ -1570,7 +1572,10 @@ bool wxTextCtrl::Show(bool show)
bool retval = wxControl::Show( show ) ;
if ( former != m_macControlIsShown )
WindowRef window = (WindowRef) MacGetRootWindow() ;
wxWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( former != m_macControlIsShown && win!=NULL && !win->IsBeingDeleted() )
{
if ( m_macControlIsShown )
TXNSetFrameBounds( (TXNObject) m_macTXN, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.top, (**(STPTextPaneVars **)m_macTXNvars).fRTextArea.left,