Commit a991cb44 authored by Maciej Suminski's avatar Maciej Suminski

Changed the way of refreshing canvases (both standard & GAL).

parent b39d562a
...@@ -222,7 +222,7 @@ void DIALOG_PAGES_SETTINGS::OnOkClick( wxCommandEvent& event ) ...@@ -222,7 +222,7 @@ void DIALOG_PAGES_SETTINGS::OnOkClick( wxCommandEvent& event )
if( SavePageSettings() ) if( SavePageSettings() )
{ {
m_screen->SetModify(); m_screen->SetModify();
m_parent->RefreshCanvas(); m_parent->GetCanvas()->Refresh();
if( m_localPrjConfigChanged ) if( m_localPrjConfigChanged )
m_parent->SaveProjectSettings( true ); m_parent->SaveProjectSettings( true );
......
...@@ -234,7 +234,7 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) ...@@ -234,7 +234,7 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED );
} }
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -394,7 +394,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) ...@@ -394,7 +394,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED );
} }
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -296,6 +296,19 @@ void EDA_DRAW_PANEL::RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackg ...@@ -296,6 +296,19 @@ void EDA_DRAW_PANEL::RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackg
} }
void EDA_DRAW_PANEL::Refresh( bool eraseBackground, const wxRect* rect )
{
if( GetParent()->IsGalCanvasActive() )
{
GetParent()->GetGalCanvas()->Refresh();
}
else
{
wxScrolledWindow::Refresh( eraseBackground, rect );
}
}
wxPoint EDA_DRAW_PANEL::GetScreenCenterLogicalPosition() wxPoint EDA_DRAW_PANEL::GetScreenCenterLogicalPosition()
{ {
wxSize size = GetClientSize() / 2; wxSize size = GetClientSize() / 2;
......
...@@ -52,7 +52,7 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe ...@@ -52,7 +52,7 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe
if( aWarpPointer ) if( aWarpPointer )
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
RefreshCanvas(); m_canvas->Refresh();
m_canvas->Update(); m_canvas->Update();
} }
...@@ -64,17 +64,8 @@ void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore ) ...@@ -64,17 +64,8 @@ void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore )
AdjustScrollBars( newCenter ); AdjustScrollBars( newCenter );
RefreshCanvas();
m_canvas->Update();
}
void EDA_DRAW_FRAME::RefreshCanvas()
{
if( m_galCanvasActive )
m_galCanvas->Refresh();
else
m_canvas->Refresh(); m_canvas->Refresh();
m_canvas->Update();
} }
...@@ -169,7 +160,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) ...@@ -169,7 +160,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
break; break;
case ID_ZOOM_REDRAW: case ID_ZOOM_REDRAW:
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_ZOOM_CENTER: case ID_POPUP_ZOOM_CENTER:
......
...@@ -317,6 +317,9 @@ public: ...@@ -317,6 +317,9 @@ public:
*/ */
void RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackground = true ); void RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackground = true );
/// @copydoc wxWindow::Refresh()
virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL );
/** /**
* Function GetScreenCenterLogicalPosition * Function GetScreenCenterLogicalPosition
* @return The current screen center position in logical (drawing) units. * @return The current screen center position in logical (drawing) units.
......
...@@ -262,8 +262,8 @@ public: ...@@ -262,8 +262,8 @@ public:
/** /**
* Function SetLayerVisible() * Function SetLayerVisible()
* Controls the visibility of a particular layer. * Controls the visibility of a particular layer.
* @param aLayer: the layer to show/hide * @param aLayer: the layer to show/hide.
* @param aVisible: the obvious * @param aVisible: the obvious.
*/ */
inline void SetLayerVisible( int aLayer, bool aVisible = true ) inline void SetLayerVisible( int aLayer, bool aVisible = true )
{ {
......
...@@ -771,12 +771,6 @@ public: ...@@ -771,12 +771,6 @@ public:
*/ */
void RedrawScreen2( const wxPoint& posBefore ); void RedrawScreen2( const wxPoint& posBefore );
/**
* Function RefreshCanvas
* Depending on the current state of GAL - it refreshes the default canvas of the GAL canvas.
*/
void RefreshCanvas();
/** /**
* Function Zoom_Automatique * Function Zoom_Automatique
* redraws the screen with best zoom level and the best centering * redraws the screen with best zoom level and the best centering
......
...@@ -293,7 +293,7 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) ...@@ -293,7 +293,7 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb )
if( newList.GetCount() ) if( newList.GetCount() )
SaveCopyInUndoList( newList, UR_CHANGED ); SaveCopyInUndoList( newList, UR_CHANGED );
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -505,7 +505,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) ...@@ -505,7 +505,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
GetScreen()->m_Active_Layer = layer; GetScreen()->m_Active_Layer = layer;
if( DisplayOpt.ContrastModeDisplay ) if( DisplayOpt.ContrastModeDisplay )
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -529,7 +529,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) ...@@ -529,7 +529,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
settings->LoadDisplayOptions( DisplayOpt ); settings->LoadDisplayOptions( DisplayOpt );
m_galCanvas->GetView()->RecacheAllItems( true ); m_galCanvas->GetView()->RecacheAllItems( true );
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -704,8 +704,8 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) ...@@ -704,8 +704,8 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg )
// must do this after the tool has been set, otherwise pad::Draw() does // must do this after the tool has been set, otherwise pad::Draw() does
// not show proper color when DisplayOpt.ContrastModeDisplay is true. // not show proper color when DisplayOpt.ContrastModeDisplay is true.
if( redraw && m_canvas ) if( redraw && m_canvas)
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, ...@@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
if( aItem->Type() == PCB_MODULE_T ) if( aItem->Type() == PCB_MODULE_T )
if( ((MODULE*)aItem)->GetFlags() & MODULE_to_PLACE ) if( ((MODULE*)aItem)->GetFlags() & MODULE_to_PLACE )
break; break;
RefreshCanvas(); m_canvas->Refresh();
#endif #endif
case UR_MOVED: case UR_MOVED:
case UR_FLIPPED: case UR_FLIPPED:
...@@ -622,7 +622,7 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event ) ...@@ -622,7 +622,7 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event )
GetScreen()->PushCommandToRedoList( List ); GetScreen()->PushCommandToRedoList( List );
OnModify(); OnModify();
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -650,7 +650,7 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event ) ...@@ -650,7 +650,7 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event )
GetScreen()->PushCommandToUndoList( List ); GetScreen()->PushCommandToUndoList( List );
OnModify(); OnModify();
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -346,7 +346,7 @@ void PCB_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor ...@@ -346,7 +346,7 @@ void PCB_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor
{ {
myframe->GetBoard()->SetLayerColor( aLayer, aColor ); myframe->GetBoard()->SetLayerColor( aLayer, aColor );
myframe->ReCreateLayerBox( NULL ); myframe->ReCreateLayerBox( NULL );
myframe->RefreshCanvas(); myframe->GetCanvas()->Refresh();
} }
...@@ -359,7 +359,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) ...@@ -359,7 +359,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
if( m_alwaysShowActiveCopperLayer ) if( m_alwaysShowActiveCopperLayer )
OnLayerSelected(); OnLayerSelected();
else if( DisplayOpt.ContrastModeDisplay ) else if( DisplayOpt.ContrastModeDisplay )
myframe->RefreshCanvas(); myframe->GetCanvas()->Refresh();
return true; return true;
} }
...@@ -401,13 +401,13 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is ...@@ -401,13 +401,13 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is
} }
if( isFinal ) if( isFinal )
myframe->RefreshCanvas(); myframe->GetCanvas()->Refresh();
} }
void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor )
{ {
myframe->GetBoard()->SetVisibleElementColor( aId, aColor ); myframe->GetBoard()->SetVisibleElementColor( aId, aColor );
myframe->RefreshCanvas(); myframe->GetCanvas()->Refresh();
} }
void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
...@@ -425,7 +425,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) ...@@ -425,7 +425,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
if( myframe->IsGalCanvasActive() ) if( myframe->IsGalCanvasActive() )
galCanvas->Refresh(); galCanvas->Refresh();
else else
myframe->RefreshCanvas(); myframe->GetCanvas()->Refresh();
} }
//-----</LAYER_WIDGET callbacks>------------------------------------------ //-----</LAYER_WIDGET callbacks>------------------------------------------
...@@ -180,7 +180,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) ...@@ -180,7 +180,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event)
if( m_Parent->IsGalCanvasActive() ) if( m_Parent->IsGalCanvasActive() )
m_Parent->GetGalCanvas()->Refresh(); m_Parent->GetGalCanvas()->Refresh();
else else
m_Parent->RefreshCanvas(); m_Parent->GetCanvas()->Refresh();
EndModal( 1 ); EndModal( 1 );
} }
...@@ -548,7 +548,7 @@ void DIALOG_DRC_CONTROL::OnUnconnectedSelectionEvent( wxCommandEvent& event ) ...@@ -548,7 +548,7 @@ void DIALOG_DRC_CONTROL::OnUnconnectedSelectionEvent( wxCommandEvent& event )
void DIALOG_DRC_CONTROL::RedrawDrawPanel() void DIALOG_DRC_CONTROL::RedrawDrawPanel()
{ {
m_Parent->RefreshCanvas(); m_Parent->GetCanvas()->Refresh();
} }
......
...@@ -185,7 +185,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -185,7 +185,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
if( state && (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) if( state && (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 )
Compile_Ratsnest( NULL, true ); Compile_Ratsnest( NULL, true );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST:
...@@ -199,36 +199,31 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -199,36 +199,31 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
case ID_TB_OPTIONS_SHOW_ZONES: case ID_TB_OPTIONS_SHOW_ZONES:
DisplayOpt.DisplayZonesMode = 0; DisplayOpt.DisplayZonesMode = 0;
recache = true; recache = true;
if( !m_galCanvasActive ) m_canvas->Refresh();
RefreshCanvas();
break; break;
case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: case ID_TB_OPTIONS_SHOW_ZONES_DISABLE:
DisplayOpt.DisplayZonesMode = 1; DisplayOpt.DisplayZonesMode = 1;
recache = true; recache = true;
if( !m_galCanvasActive ) m_canvas->Refresh();
RefreshCanvas();
break; break;
case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY:
DisplayOpt.DisplayZonesMode = 2; DisplayOpt.DisplayZonesMode = 2;
recache = true; recache = true;
if( !m_galCanvasActive ) m_canvas->Refresh();
RefreshCanvas();
break; break;
case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: case ID_TB_OPTIONS_SHOW_VIAS_SKETCH:
m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state;
recache = true; recache = true;
if( !m_galCanvasActive ) m_canvas->Refresh();
RefreshCanvas();
break; break;
case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH:
m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state;
recache = true; recache = true;
if( !m_galCanvasActive ) m_canvas->Refresh();
RefreshCanvas();
break; break;
case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE:
...@@ -239,12 +234,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -239,12 +234,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
settings->LoadDisplayOptions( DisplayOpt ); settings->LoadDisplayOptions( DisplayOpt );
setHighContrastLayer( getActiveLayer() ); setHighContrastLayer( getActiveLayer() );
// m_galCanvas->GetView()->EnableTopLayer( state ); m_canvas->Refresh();
if( m_galCanvasActive )
m_galCanvas->Refresh();
else
RefreshCanvas();
break; break;
} }
......
...@@ -182,7 +182,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) ...@@ -182,7 +182,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( )
m_Parent->Compile_Ratsnest( NULL, true ); m_Parent->Compile_Ratsnest( NULL, true );
} }
m_Parent->RefreshCanvas(); m_Parent->GetCanvas()->Refresh();
m_Parent->OnModify(); m_Parent->OnModify();
EndModal( 1 ); EndModal( 1 );
......
...@@ -206,7 +206,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event ) ...@@ -206,7 +206,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event )
EndModal( 1 ); EndModal( 1 );
if( change ) if( change )
m_Parent->RefreshCanvas(); m_Parent->GetCanvas()->Refresh();
} }
......
...@@ -136,7 +136,7 @@ void PCB_EDIT_FRAME::OnResetModuleTextSizes( wxCommandEvent& event ) ...@@ -136,7 +136,7 @@ void PCB_EDIT_FRAME::OnResetModuleTextSizes( wxCommandEvent& event )
DIALOG_GLOBAL_MODULES_FIELDS_EDITION dlg(this); DIALOG_GLOBAL_MODULES_FIELDS_EDITION dlg(this);
dlg.ShowModal(); dlg.ShowModal();
RefreshCanvas(); m_canvas->Refresh();
} }
void PCB_BASE_FRAME::ResetModuleTextSizes( const wxString & aFilter, bool aRef, void PCB_BASE_FRAME::ResetModuleTextSizes( const wxString & aFilter, bool aRef,
......
...@@ -104,7 +104,7 @@ void PCB_EDIT_FRAME::OnOrientFootprints( wxCommandEvent& event ) ...@@ -104,7 +104,7 @@ void PCB_EDIT_FRAME::OnOrientFootprints( wxCommandEvent& event )
if( ReOrientModules( text, dlg.GetOrientation(), dlg.ApplyToLockedModules() ) ) if( ReOrientModules( text, dlg.GetOrientation(), dlg.ApplyToLockedModules() ) )
{ {
RefreshCanvas(); m_canvas->Refresh();
Compile_Ratsnest( NULL, true ); Compile_Ratsnest( NULL, true );
} }
} }
......
...@@ -223,7 +223,7 @@ bool PCB_BASE_FRAME::InvokeDialogGrid() ...@@ -223,7 +223,7 @@ bool PCB_BASE_FRAME::InvokeDialogGrid()
if( GetScreen()->GetGridId() == ID_POPUP_GRID_USER ) if( GetScreen()->GetGridId() == ID_POPUP_GRID_USER )
GetScreen()->SetGrid( ID_POPUP_GRID_USER ); GetScreen()->SetGrid( ID_POPUP_GRID_USER );
RefreshCanvas(); m_canvas->Refresh();
return true; return true;
} }
......
...@@ -399,7 +399,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -399,7 +399,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
GetDesignSettings().m_CurrentViaType = v_type; GetDesignSettings().m_CurrentViaType = v_type;
if( DisplayOpt.ContrastModeDisplay ) if( DisplayOpt.ContrastModeDisplay )
RefreshCanvas(); m_canvas->Refresh();
} }
break; break;
...@@ -572,7 +572,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -572,7 +572,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_FILL_ALL_ZONES: case ID_POPUP_PCB_FILL_ALL_ZONES:
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
Fill_All_Zones( this ); Fill_All_Zones( this );
RefreshCanvas(); m_canvas->Refresh();
SetMsgPanel( GetBoard() ); SetMsgPanel( GetBoard() );
break; break;
...@@ -584,7 +584,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -584,7 +584,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
TestNetConnection( NULL, zone_container->GetNet() ); TestNetConnection( NULL, zone_container->GetNet() );
OnModify(); OnModify();
SetMsgPanel( GetBoard() ); SetMsgPanel( GetBoard() );
RefreshCanvas(); m_canvas->Refresh();
} }
SetCurItem( NULL ); SetCurItem( NULL );
break; break;
...@@ -604,7 +604,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -604,7 +604,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
TestForActiveLinksInRatsnest( 0 ); // Recalculate the active ratsnest, i.e. the unconnected links TestForActiveLinksInRatsnest( 0 ); // Recalculate the active ratsnest, i.e. the unconnected links
OnModify(); OnModify();
SetMsgPanel( GetBoard() ); SetMsgPanel( GetBoard() );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_PCB_FILL_ZONE: case ID_POPUP_PCB_FILL_ZONE:
...@@ -612,7 +612,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -612,7 +612,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
Fill_Zone( (ZONE_CONTAINER*) GetCurItem() ); Fill_Zone( (ZONE_CONTAINER*) GetCurItem() );
TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNet() ); TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNet() );
SetMsgPanel( GetBoard() ); SetMsgPanel( GetBoard() );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST: case ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST:
...@@ -1040,7 +1040,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -1040,7 +1040,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
Delete_Drawings_All_Layer( GetCurItem()->GetLayer() ); Delete_Drawings_All_Layer( GetCurItem()->GetLayer() );
SetCurItem( NULL ); SetCurItem( NULL );
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_PCB_EDIT_DRAWING: case ID_POPUP_PCB_EDIT_DRAWING:
...@@ -1291,7 +1291,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) ...@@ -1291,7 +1291,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) ) if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) )
{ {
if( DisplayOpt.ContrastModeDisplay ) if( DisplayOpt.ContrastModeDisplay )
RefreshCanvas(); m_canvas->Refresh();
} }
// if the via was allowed by DRC, then the layer swap has already // if the via was allowed by DRC, then the layer swap has already
...@@ -1310,7 +1310,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) ...@@ -1310,7 +1310,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
setActiveLayer( layer ); setActiveLayer( layer );
if( DisplayOpt.ContrastModeDisplay ) if( DisplayOpt.ContrastModeDisplay )
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) ...@@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
TextePcb->ClearFlags(); TextePcb->ClearFlags();
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
RefreshCanvas(); m_canvas->Refresh();
#endif #endif
} }
...@@ -144,7 +144,7 @@ void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aE ...@@ -144,7 +144,7 @@ void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aE
SetMsgPanel( aTextePcb ); SetMsgPanel( aTextePcb );
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
RefreshCanvas(); m_canvas->Refresh();
#endif #endif
SetCrossHairPosition( aTextePcb->GetTextPosition() ); SetCrossHairPosition( aTextePcb->GetTextPosition() );
...@@ -257,7 +257,7 @@ void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) ...@@ -257,7 +257,7 @@ void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC )
OnModify(); OnModify();
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
RefreshCanvas(); m_canvas->Refresh();
#endif #endif
} }
...@@ -281,6 +281,6 @@ void PCB_EDIT_FRAME::FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC ) ...@@ -281,6 +281,6 @@ void PCB_EDIT_FRAME::FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC )
OnModify(); OnModify();
#ifdef USE_WX_OVERLAY #ifdef USE_WX_OVERLAY
RefreshCanvas(); m_canvas->Refresh();
#endif #endif
} }
...@@ -68,7 +68,7 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) ...@@ -68,7 +68,7 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC )
#ifdef __WXMAC__ #ifdef __WXMAC__
// If something edited, push a refresh request // If something edited, push a refresh request
if (retvalue == 0 || retvalue == 1) if (retvalue == 0 || retvalue == 1)
RefreshCanvas(); m_canvas->Refresh();
#endif #endif
if( retvalue == 2 ) if( retvalue == 2 )
...@@ -120,7 +120,7 @@ void FOOTPRINT_EDIT_FRAME::RemoveStruct( EDA_ITEM* Item ) ...@@ -120,7 +120,7 @@ void FOOTPRINT_EDIT_FRAME::RemoveStruct( EDA_ITEM* Item )
case PCB_MODULE_EDGE_T: case PCB_MODULE_EDGE_T:
Delete_Edge_Module( (EDGE_MODULE*) Item ); Delete_Edge_Module( (EDGE_MODULE*) Item );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case PCB_MODULE_T: case PCB_MODULE_T:
......
...@@ -349,7 +349,7 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC ) ...@@ -349,7 +349,7 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
text->SetThickness( newThickness ); text->SetThickness( newThickness );
if( aDC ) if( aDC )
RefreshCanvas(); m_canvas->Refresh();
OnModify(); OnModify();
} }
...@@ -118,5 +118,5 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) ...@@ -118,5 +118,5 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
}*/ }*/
//+hp //+hp
//Refresh canvas, that we can see changes instantly. I use this because it dont,t throw mouse up-left corner. //Refresh canvas, that we can see changes instantly. I use this because it dont,t throw mouse up-left corner.
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -120,7 +120,7 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint() ...@@ -120,7 +120,7 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint()
DBG(printf( "footprintWizard->GetModule() returns NULL\n" );) DBG(printf( "footprintWizard->GetModule() returns NULL\n" );)
} }
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -409,7 +409,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList() ...@@ -409,7 +409,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList()
ReCreateParameterList(); ReCreateParameterList();
ReCreateHToolbar(); ReCreateHToolbar();
DisplayWizardInfos(); DisplayWizardInfos();
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -507,7 +507,7 @@ void FOOTPRINT_WIZARD_FRAME::ClickOnPageList( wxCommandEvent& event ) ...@@ -507,7 +507,7 @@ void FOOTPRINT_WIZARD_FRAME::ClickOnPageList( wxCommandEvent& event )
return; return;
ReCreateParameterList(); ReCreateParameterList();
RefreshCanvas(); m_canvas->Refresh();
DisplayWizardInfos(); DisplayWizardInfos();
} }
......
...@@ -366,7 +366,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit ...@@ -366,7 +366,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
DisplayOpt.DisplayPcbTrackFill ^= 1; DisplayOpt.DisplayPcbTrackFill ^= 1;
DisplayOpt.DisplayPcbTrackFill &= 1; DisplayOpt.DisplayPcbTrackFill &= 1;
m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
RefreshCanvas(); m_canvas->Refresh();
break; break;
case HK_DELETE: case HK_DELETE:
...@@ -463,7 +463,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit ...@@ -463,7 +463,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
{ {
Other_Layer_Route( NULL, aDC ); Other_Layer_Route( NULL, aDC );
if( DisplayOpt.ContrastModeDisplay ) if( DisplayOpt.ContrastModeDisplay )
RefreshCanvas(); m_canvas->Refresh();
break; break;
} }
...@@ -546,7 +546,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit ...@@ -546,7 +546,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas
DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay;
RefreshCanvas(); m_canvas->Refresh();
break; break;
case HK_CANVAS_CAIRO: case HK_CANVAS_CAIRO:
......
...@@ -541,7 +541,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -541,7 +541,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
GetScreen()->GetCurItem()->ClearFlags(); GetScreen()->GetCurItem()->ClearFlags();
if( ret > 0 ) if( ret > 0 )
RefreshCanvas(); m_canvas->Refresh();
} }
break; break;
...@@ -571,7 +571,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -571,7 +571,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
if( ret > 0 ) if( ret > 0 )
RefreshCanvas(); m_canvas->Refresh();
} }
break; break;
...@@ -660,38 +660,38 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -660,38 +660,38 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
if( edge ) if( edge )
RefreshCanvas(); m_canvas->Refresh();
} }
break; break;
case ID_POPUP_MODEDIT_EDIT_BODY_ITEM : case ID_POPUP_MODEDIT_EDIT_BODY_ITEM :
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) GetScreen()->GetCurItem() ); InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) GetScreen()->GetCurItem() );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_MODEDIT_EDIT_WIDTH_CURRENT_EDGE: case ID_POPUP_MODEDIT_EDIT_WIDTH_CURRENT_EDGE:
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
Edit_Edge_Width( (EDGE_MODULE*) GetScreen()->GetCurItem() ); Edit_Edge_Width( (EDGE_MODULE*) GetScreen()->GetCurItem() );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_MODEDIT_EDIT_WIDTH_ALL_EDGE: case ID_POPUP_MODEDIT_EDIT_WIDTH_ALL_EDGE:
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
Edit_Edge_Width( NULL ); Edit_Edge_Width( NULL );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_MODEDIT_EDIT_LAYER_CURRENT_EDGE: case ID_POPUP_MODEDIT_EDIT_LAYER_CURRENT_EDGE:
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
Edit_Edge_Layer( (EDGE_MODULE*) GetScreen()->GetCurItem() ); Edit_Edge_Layer( (EDGE_MODULE*) GetScreen()->GetCurItem() );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_MODEDIT_EDIT_LAYER_ALL_EDGE: case ID_POPUP_MODEDIT_EDIT_LAYER_ALL_EDGE:
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
Edit_Edge_Layer( NULL ); Edit_Edge_Layer( NULL );
RefreshCanvas(); m_canvas->Refresh();
break; break;
case ID_POPUP_PCB_DELETE_EDGE: case ID_POPUP_PCB_DELETE_EDGE:
...@@ -774,7 +774,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -774,7 +774,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
} }
if( redraw ) if( redraw )
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -97,13 +97,13 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -97,13 +97,13 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{ {
End_Edge_Module( (EDGE_MODULE*) item ); End_Edge_Module( (EDGE_MODULE*) item );
SetCurItem( NULL ); SetCurItem( NULL );
RefreshCanvas(); m_canvas->Refresh();
} }
else if( ( (EDGE_MODULE*) item )->GetShape() == S_ARC ) else if( ( (EDGE_MODULE*) item )->GetShape() == S_ARC )
{ {
End_Edge_Module( (EDGE_MODULE*) item ); End_Edge_Module( (EDGE_MODULE*) item );
SetCurItem( NULL ); SetCurItem( NULL );
RefreshCanvas(); m_canvas->Refresh();
} }
else if( ( (EDGE_MODULE*) item )->GetShape() == S_SEGMENT ) else if( ( (EDGE_MODULE*) item )->GetShape() == S_SEGMENT )
{ {
...@@ -149,7 +149,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -149,7 +149,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
// so deselect the active tool // so deselect the active tool
SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
SetCurItem( NULL ); SetCurItem( NULL );
RefreshCanvas(); m_canvas->Refresh();
} }
break; break;
...@@ -435,7 +435,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -435,7 +435,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
if( ret > 0 ) if( ret > 0 )
RefreshCanvas(); m_canvas->Refresh();
} }
break; break;
...@@ -447,7 +447,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -447,7 +447,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
case PCB_MODULE_EDGE_T : case PCB_MODULE_EDGE_T :
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) item ); InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) item );
RefreshCanvas(); m_canvas->Refresh();
break; break;
default: default:
...@@ -462,7 +462,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) ...@@ -462,7 +462,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
{ {
End_Edge_Module( (EDGE_MODULE*) item ); End_Edge_Module( (EDGE_MODULE*) item );
SetCurItem( NULL ); SetCurItem( NULL );
RefreshCanvas(); m_canvas->Refresh();
} }
break; break;
......
...@@ -72,7 +72,7 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event ) ...@@ -72,7 +72,7 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event )
SetCurItem( NULL ); SetCurItem( NULL );
OnModify(); OnModify();
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -101,5 +101,5 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event ) ...@@ -101,5 +101,5 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event )
SetCurItem( NULL ); SetCurItem( NULL );
OnModify(); OnModify();
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -285,7 +285,7 @@ bool PCB_EDIT_FRAME::Delete_Module( MODULE* aModule, wxDC* aDC, bool aAskBeforeD ...@@ -285,7 +285,7 @@ bool PCB_EDIT_FRAME::Delete_Module( MODULE* aModule, wxDC* aDC, bool aAskBeforeD
// Redraw the full screen to ensure perfect display of board and ratsnest. // Redraw the full screen to ensure perfect display of board and ratsnest.
if( aDC ) if( aDC )
RefreshCanvas(); m_canvas->Refresh();
return true; return true;
} }
...@@ -421,7 +421,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreat ...@@ -421,7 +421,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreat
Compile_Ratsnest( aDC, true ); Compile_Ratsnest( aDC, true );
if( aDC ) if( aDC )
RefreshCanvas(); m_canvas->Refresh();
SetMsgPanel( aModule ); SetMsgPanel( aModule );
} }
...@@ -490,7 +490,7 @@ void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool ...@@ -490,7 +490,7 @@ void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool
} }
if( module->GetFlags() == 0 ) // module not in edit: redraw full screen if( module->GetFlags() == 0 ) // module not in edit: redraw full screen
RefreshCanvas(); m_canvas->Refresh();
} }
} }
......
...@@ -165,7 +165,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) ...@@ -165,7 +165,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event )
SetCurItem( NULL ); SetCurItem( NULL );
Zoom_Automatique( false ); Zoom_Automatique( false );
RefreshCanvas(); m_canvas->Refresh();
Update3D_Frame(); Update3D_Frame();
m_FootprintList->SetStringSelection( m_footprintName ); m_FootprintList->SetStringSelection( m_footprintName );
} }
......
...@@ -411,7 +411,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() ...@@ -411,7 +411,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
ReCreateFootprintList(); ReCreateFootprintList();
ReCreateHToolbar(); ReCreateHToolbar();
DisplayLibInfos(); DisplayLibInfos();
RefreshCanvas(); m_canvas->Refresh();
} }
...@@ -477,7 +477,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event ) ...@@ -477,7 +477,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event )
m_libraryName = name; m_libraryName = name;
ReCreateFootprintList(); ReCreateFootprintList();
RefreshCanvas(); m_canvas->Refresh();
DisplayLibInfos(); DisplayLibInfos();
ReCreateHToolbar(); ReCreateHToolbar();
} }
...@@ -525,7 +525,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) ...@@ -525,7 +525,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event )
DisplayLibInfos(); DisplayLibInfos();
Zoom_Automatique( false ); Zoom_Automatique( false );
RefreshCanvas(); m_canvas->Refresh();
Update3D_Frame(); Update3D_Frame();
} }
} }
......
...@@ -892,7 +892,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) ...@@ -892,7 +892,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC )
if( current_net_code > 0 ) if( current_net_code > 0 )
TestNetConnection( DC, current_net_code ); TestNetConnection( DC, current_net_code );
RefreshCanvas(); m_canvas->Refresh();
return true; return true;
} }
...@@ -112,7 +112,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, ...@@ -112,7 +112,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
// Rebuild the board connectivity: // Rebuild the board connectivity:
Compile_Ratsnest( NULL, true ); Compile_Ratsnest( NULL, true );
SetMsgPanel( GetBoard() ); SetMsgPanel( GetBoard() );
RefreshCanvas(); m_canvas->Refresh();
} }
......
...@@ -243,7 +243,7 @@ void PCB_BASE_FRAME::SelectLayerPair() ...@@ -243,7 +243,7 @@ void PCB_BASE_FRAME::SelectLayerPair()
// because the PAD_SMD pads may change color. // because the PAD_SMD pads may change color.
if( result >= 0 && DisplayOpt.ContrastModeDisplay ) if( result >= 0 && DisplayOpt.ContrastModeDisplay )
{ {
RefreshCanvas(); m_canvas->Refresh();
} }
} }
......
...@@ -281,7 +281,7 @@ void DIALOG_EXCHANGE_MODULE::Change_Current_Module() ...@@ -281,7 +281,7 @@ void DIALOG_EXCHANGE_MODULE::Change_Current_Module()
if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) )
m_Parent->Compile_Ratsnest( NULL, true ); m_Parent->Compile_Ratsnest( NULL, true );
m_Parent->RefreshCanvas(); m_Parent->GetCanvas()->Refresh();
} }
if( pickList.GetCount() ) if( pickList.GetCount() )
...@@ -370,7 +370,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleId( bool aUseValue ) ...@@ -370,7 +370,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleId( bool aUseValue )
if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) )
m_Parent->Compile_Ratsnest( NULL, true ); m_Parent->Compile_Ratsnest( NULL, true );
m_Parent->RefreshCanvas(); m_Parent->GetCanvas()->Refresh();
} }
if( pickList.GetCount() ) if( pickList.GetCount() )
...@@ -423,7 +423,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleAll() ...@@ -423,7 +423,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleAll()
if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) )
m_Parent->Compile_Ratsnest( NULL, true ); m_Parent->Compile_Ratsnest( NULL, true );
m_Parent->RefreshCanvas(); m_Parent->GetCanvas()->Refresh();
} }
if( pickList.GetCount() ) if( pickList.GetCount() )
......
...@@ -333,7 +333,7 @@ void PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* ...@@ -333,7 +333,7 @@ void PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER*
// Combine zones if possible // Combine zones if possible
wxBusyCursor dummy; wxBusyCursor dummy;
GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone ); GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone );
RefreshCanvas(); m_canvas->Refresh();
int ii = GetBoard()->GetAreaIndex( aZone ); // test if aZone exists int ii = GetBoard()->GetAreaIndex( aZone ); // test if aZone exists
......
...@@ -80,7 +80,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, time_t aTimestamp ) ...@@ -80,7 +80,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, time_t aTimestamp )
if( modify ) if( modify )
{ {
OnModify(); OnModify();
RefreshCanvas(); m_canvas->Refresh();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment