From f3cfea9521a0d43f8ecce6a1fbff87d3b925770e Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Sun, 22 Dec 2013 18:29:57 +0100 Subject: [PATCH] [MacOSX] Fixing crash when changing module text properties - bug #1230090 --- pcbnew/dialogs/dialog_edit_module_text.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/dialogs/dialog_edit_module_text.cpp b/pcbnew/dialogs/dialog_edit_module_text.cpp index 18917824ac..267bc05cd6 100644 --- a/pcbnew/dialogs/dialog_edit_module_text.cpp +++ b/pcbnew/dialogs/dialog_edit_module_text.cpp @@ -183,11 +183,13 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event ) if ( m_module) m_parent->SaveCopyInUndoList( m_module, UR_CHANGED ); +#ifndef USE_WX_OVERLAY if( m_dc ) //Erase old text on screen { m_currentText->Draw( m_parent->GetCanvas(), m_dc, GR_XOR, (m_currentText->IsMoving()) ? MoveVector : wxPoint( 0, 0 ) ); } +#endif m_currentText->SetText( m_Name->GetValue() ); m_currentText->SetItalic( m_Style->GetSelection() == 1 ); @@ -238,11 +240,15 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event ) m_currentText->SetDrawCoord(); +#ifndef USE_WX_OVERLAY if( m_dc ) // Display new text { m_currentText->Draw( m_parent->GetCanvas(), m_dc, GR_XOR, (m_currentText->IsMoving()) ? MoveVector : wxPoint( 0, 0 ) ); } +#else + m_parent->Refresh(); +#endif m_parent->OnModify();