[MacOSX] Fixing crash/missing refresh in pcb text

This commit is contained in:
Marco Serantoni 2013-12-22 18:39:37 +01:00
parent f3cfea9521
commit 057a947a4b
1 changed files with 6 additions and 1 deletions

View File

@ -187,11 +187,13 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event )
if( m_SelectedPCBText->GetFlags() != 0 )
m_SelectedPCBText->SetFlags( IN_EDIT );
#ifndef USE_WX_OVERLAY
// Erase old text on screen if context is available
if( m_DC )
{
m_SelectedPCBText->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR );
}
#endif
// Set the new text content
if( !m_TextContentCtrl->GetValue().IsEmpty() )
@ -268,12 +270,15 @@ void DIALOG_PCB_TEXT_PROPERTIES::OnOkClick( wxCommandEvent& event )
break;
}
#ifndef USE_WX_OVERLAY
// Finally, display new text if there is a context to do so
if( m_DC )
{
m_SelectedPCBText->Draw( m_Parent->GetCanvas(), m_DC, GR_OR );
}
#else
m_parent->Refresh();
#endif
m_Parent->OnModify();
EndModal( 1 );
}