From 55c3fce7909061c334cb638d327ebee241e94a24 Mon Sep 17 00:00:00 2001 From: Marco Serantoni Date: Fri, 14 Mar 2014 02:10:27 +0100 Subject: [PATCH] [MacOSX] Pcbnew crash on editing dimension's line width --- pcbnew/dimension.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 819c1a3110..fee6c85304 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -160,10 +160,12 @@ void DIALOG_DIMENSION_EDITOR::OnCancelClick( wxCommandEvent& event ) void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) { +#ifndef USE_WX_OVERLAY if( m_DC ) // Delete old text. { CurrentDimension->Draw( m_Parent->GetCanvas(), m_DC, GR_XOR ); } +#endif m_Parent->SaveCopyInUndoList(CurrentDimension, UR_CHANGED); @@ -207,12 +209,14 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event ) CurrentDimension->Text().SetMirrored( ( m_rbMirror->GetSelection() == 1 ) ? true : false ); CurrentDimension->SetLayer( m_SelLayerBox->GetLayerSelection() ); - +#ifndef USE_WX_OVERLAY if( m_DC ) // Display new text { CurrentDimension->Draw( m_Parent->GetCanvas(), m_DC, GR_OR ); } - +#else + m_Parent->Refresh(); +#endif m_Parent->OnModify(); EndModal( 1 ); }