Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
ab4cb862
Commit
ab4cb862
authored
Sep 06, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Solved refreshing issues.
parent
f04df9d7
Changes
40
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
128 additions
and
118 deletions
+128
-118
dialog_page_settings.cpp
common/dialogs/dialog_page_settings.cpp
+1
-1
drawframe.cpp
common/drawframe.cpp
+2
-5
view.cpp
common/view/view.cpp
+1
-1
view_group.cpp
common/view/view_group.cpp
+12
-16
zoom.cpp
common/zoom.cpp
+12
-3
view.h
include/view/view.h
+12
-3
wxstruct.h
include/wxstruct.h
+6
-2
automove.cpp
pcbnew/autorouter/automove.cpp
+1
-1
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+4
-7
board_undo_redo.cpp
pcbnew/board_undo_redo.cpp
+3
-3
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+5
-5
dialog_display_options.cpp
pcbnew/dialogs/dialog_display_options.cpp
+1
-1
dialog_drc.cpp
pcbnew/dialogs/dialog_drc.cpp
+1
-1
dialog_general_options.cpp
pcbnew/dialogs/dialog_general_options.cpp
+7
-7
dialog_global_deletion.cpp
pcbnew/dialogs/dialog_global_deletion.cpp
+1
-1
dialog_global_edit_tracks_and_vias.cpp
pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp
+1
-1
dialog_global_modules_fields_edition.cpp
pcbnew/dialogs/dialog_global_modules_fields_edition.cpp
+1
-1
dialog_orient_footprints.cpp
pcbnew/dialogs/dialog_orient_footprints.cpp
+1
-1
dialog_set_grid.cpp
pcbnew/dialogs/dialog_set_grid.cpp
+1
-1
edit.cpp
pcbnew/edit.cpp
+8
-8
edit_pcb_text.cpp
pcbnew/edit_pcb_text.cpp
+4
-4
editmod.cpp
pcbnew/editmod.cpp
+2
-2
edtxtmod.cpp
pcbnew/edtxtmod.cpp
+1
-1
event_handlers_tracks_vias_sizes.cpp
pcbnew/event_handlers_tracks_vias_sizes.cpp
+1
-1
footprint_wizard.cpp
pcbnew/footprint_wizard.cpp
+1
-1
footprint_wizard_frame.cpp
pcbnew/footprint_wizard_frame.cpp
+2
-2
hotkeys_board_editor.cpp
pcbnew/hotkeys_board_editor.cpp
+3
-3
modedit.cpp
pcbnew/modedit.cpp
+9
-9
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+6
-6
modedit_undo_redo.cpp
pcbnew/modedit_undo_redo.cpp
+2
-2
modules.cpp
pcbnew/modules.cpp
+3
-3
modview.cpp
pcbnew/modview.cpp
+1
-1
modview_frame.cpp
pcbnew/modview_frame.cpp
+3
-3
move_or_drag_track.cpp
pcbnew/move_or_drag_track.cpp
+1
-1
netlist.cpp
pcbnew/netlist.cpp
+1
-1
pcbframe.cpp
pcbnew/pcbframe.cpp
+1
-3
sel_layer.cpp
pcbnew/sel_layer.cpp
+1
-1
xchgmod.cpp
pcbnew/xchgmod.cpp
+3
-3
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+1
-1
zones_by_polygon_fill_functions.cpp
pcbnew/zones_by_polygon_fill_functions.cpp
+1
-1
No files found.
common/dialogs/dialog_page_settings.cpp
View file @
ab4cb862
...
@@ -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
->
GetCanvas
()
->
Refresh
();
m_parent
->
RefreshCanvas
();
if
(
m_localPrjConfigChanged
)
if
(
m_localPrjConfigChanged
)
m_parent
->
SaveProjectSettings
(
true
);
m_parent
->
SaveProjectSettings
(
true
);
...
...
common/drawframe.cpp
View file @
ab4cb862
...
@@ -235,12 +235,9 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
...
@@ -235,12 +235,9 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
{
{
SetGridVisibility
(
!
IsGridVisible
()
);
SetGridVisibility
(
!
IsGridVisible
()
);
if
(
m_galCanvasActive
)
if
(
m_galCanvasActive
)
{
m_galCanvas
->
GetGAL
()
->
SetGridVisibility
(
IsGridVisible
()
);
m_galCanvas
->
GetGAL
()
->
SetGridVisibility
(
IsGridVisible
()
);
m_galCanvas
->
Refresh
();
}
RefreshCanvas
();
else
m_canvas
->
Refresh
();
}
}
...
...
common/view/view.cpp
View file @
ab4cb862
...
@@ -915,7 +915,7 @@ void VIEW::RecacheAllItems( bool aImmediately )
...
@@ -915,7 +915,7 @@ void VIEW::RecacheAllItems( bool aImmediately )
m_gal
->
SetLayerDepth
(
l
->
renderingOrder
);
m_gal
->
SetLayerDepth
(
l
->
renderingOrder
);
recacheLayer
visitor
(
this
,
m_gal
,
l
->
id
,
aImmediately
);
recacheLayer
visitor
(
this
,
m_gal
,
l
->
id
,
aImmediately
);
l
->
items
->
Query
(
r
,
visitor
);
l
->
items
->
Query
(
r
,
visitor
);
l
->
isDirty
=
fals
e
;
l
->
isDirty
=
tru
e
;
}
}
}
}
...
...
common/view/view_group.cpp
View file @
ab4cb862
...
@@ -82,15 +82,9 @@ unsigned int VIEW_GROUP::GetSize() const
...
@@ -82,15 +82,9 @@ unsigned int VIEW_GROUP::GetSize() const
const
BOX2I
VIEW_GROUP
::
ViewBBox
()
const
const
BOX2I
VIEW_GROUP
::
ViewBBox
()
const
{
{
BOX2I
box
;
BOX2I
maxBox
;
maxBox
.
SetMaximum
();
// Merge all bounding boxes, so the returned one contains all stored items
return
maxBox
;
BOOST_FOREACH
(
VIEW_ITEM
*
item
,
m_items
)
{
box
.
Merge
(
item
->
ViewBBox
()
);
}
return
box
;
}
}
...
@@ -106,32 +100,34 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co
...
@@ -106,32 +100,34 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co
m_view
->
SortLayers
(
layers
,
layers_count
);
m_view
->
SortLayers
(
layers
,
layers_count
);
for
(
int
i
=
0
;
i
<
layers_count
;
i
++
)
for
(
int
i
=
0
;
i
<
layers_count
;
i
++
)
{
if
(
m_view
->
IsCached
(
layers
[
i
]
)
&&
m_view
->
IsLayerVisible
(
layers
[
i
]
)
)
{
{
aGal
->
SetLayerDepth
(
m_view
->
GetLayerOrder
(
layers
[
i
]
)
);
aGal
->
SetLayerDepth
(
m_view
->
GetLayerOrder
(
layers
[
i
]
)
);
if
(
!
painter
->
Draw
(
item
,
layers
[
i
]
)
)
if
(
!
painter
->
Draw
(
item
,
layers
[
i
]
)
)
item
->
ViewDraw
(
layers
[
i
],
aGal
,
aVisibleArea
);
// Alternative drawing method
item
->
ViewDraw
(
layers
[
i
],
aGal
,
aVisibleArea
);
// Alternative drawing method
}
}
}
/// m_view->Draw( item, true );
}
}
}
}
void
VIEW_GROUP
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
void
VIEW_GROUP
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
{
// Everything is displayed on a single layer
aLayers
[
0
]
=
m_layer
;
aLayers
[
0
]
=
m_layer
;
aCount
=
1
;
aCount
=
1
;
}
}
void
VIEW_GROUP
::
ViewUpdate
(
int
aUpdateFlags
,
bool
aForceImmediateRedraw
)
/*
void VIEW_GROUP::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw )
{
{
BOOST_FOREACH( VIEW_ITEM* item, m_items )
BOOST_FOREACH( VIEW_ITEM* item, m_items )
{
{
item->ViewUpdate( aUpdateFlags, aForceImmediateRedraw );
item->ViewUpdate( aUpdateFlags, aForceImmediateRedraw );
}
}
}
}
*/
void
VIEW_GROUP
::
updateBbox
()
void
VIEW_GROUP
::
updateBbox
()
...
...
common/zoom.cpp
View file @
ab4cb862
...
@@ -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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
m_canvas
->
Update
();
m_canvas
->
Update
();
}
}
...
@@ -64,11 +64,20 @@ void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore )
...
@@ -64,11 +64,20 @@ void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore )
AdjustScrollBars
(
newCenter
);
AdjustScrollBars
(
newCenter
);
m_canvas
->
Refresh
();
RefreshCanvas
();
m_canvas
->
Update
();
m_canvas
->
Update
();
}
}
void
EDA_DRAW_FRAME
::
RefreshCanvas
()
{
if
(
m_galCanvasActive
)
m_galCanvas
->
Refresh
();
else
m_canvas
->
Refresh
();
}
void
EDA_DRAW_FRAME
::
Zoom_Automatique
(
bool
aWarpPointer
)
void
EDA_DRAW_FRAME
::
Zoom_Automatique
(
bool
aWarpPointer
)
{
{
BASE_SCREEN
*
screen
=
GetScreen
();
BASE_SCREEN
*
screen
=
GetScreen
();
...
@@ -160,7 +169,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
...
@@ -160,7 +169,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event )
break
;
break
;
case
ID_ZOOM_REDRAW
:
case
ID_ZOOM_REDRAW
:
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
case
ID_POPUP_ZOOM_CENTER
:
case
ID_POPUP_ZOOM_CENTER
:
...
...
include/view/view.h
View file @
ab4cb862
...
@@ -262,15 +262,24 @@ public:
...
@@ -262,15 +262,24 @@ 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. When ALL_LAYERS constant is given, all layers'
* @param aLayer: the layer to show/hide
* visibility is updated
* @param aVisible: the obvious
* @param aVisible: the obivous
*/
*/
inline
void
SetLayerVisible
(
int
aLayer
,
bool
aVisible
=
true
)
inline
void
SetLayerVisible
(
int
aLayer
,
bool
aVisible
=
true
)
{
{
m_layers
[
aLayer
].
enabled
=
aVisible
;
m_layers
[
aLayer
].
enabled
=
aVisible
;
}
}
/**
* Function IsLayerVisible()
* Returns information about visibility of a particular layer.
* @param aLayer: true if the layer is visible, false otherwise
*/
inline
bool
IsLayerVisible
(
int
aLayer
)
const
{
return
m_layers
.
at
(
aLayer
).
enabled
;
}
/**
/**
* Function SetLayerTarget()
* Function SetLayerTarget()
* Changes the rendering target for a particular layer.
* Changes the rendering target for a particular layer.
...
...
include/wxstruct.h
View file @
ab4cb862
...
@@ -452,8 +452,6 @@ protected:
...
@@ -452,8 +452,6 @@ protected:
wxOverlay
m_overlay
;
wxOverlay
m_overlay
;
#endif
#endif
protected
:
void
SetScreen
(
BASE_SCREEN
*
aScreen
)
{
m_currentScreen
=
aScreen
;
}
void
SetScreen
(
BASE_SCREEN
*
aScreen
)
{
m_currentScreen
=
aScreen
;
}
/**
/**
...
@@ -692,6 +690,12 @@ public:
...
@@ -692,6 +690,12 @@ 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
...
...
pcbnew/autorouter/automove.cpp
View file @
ab4cb862
...
@@ -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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
...
pcbnew/basepcbframe.cpp
View file @
ab4cb862
...
@@ -431,7 +431,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
...
@@ -431,7 +431,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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
@@ -455,10 +455,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
...
@@ -455,10 +455,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
settings
->
LoadDisplayOptions
(
DisplayOpt
);
settings
->
LoadDisplayOptions
(
DisplayOpt
);
m_galCanvas
->
GetView
()
->
RecacheAllItems
(
true
);
m_galCanvas
->
GetView
()
->
RecacheAllItems
(
true
);
if
(
IsGalCanvasActive
()
)
RefreshCanvas
();
m_galCanvas
->
Refresh
();
else
m_canvas
->
Refresh
();
}
}
...
@@ -625,8 +622,8 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg )
...
@@ -625,8 +622,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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
...
pcbnew/board_undo_redo.cpp
View file @
ab4cb862
...
@@ -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
;
m_canvas
->
Refresh
();
RefreshCanvas
();
#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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
@@ -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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
ab4cb862
...
@@ -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
->
GetCanvas
()
->
Refresh
();
myframe
->
RefreshCanvas
();
}
}
...
@@ -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
->
GetCanvas
()
->
Refresh
();
myframe
->
RefreshCanvas
();
return
true
;
return
true
;
}
}
...
@@ -405,14 +405,14 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is
...
@@ -405,14 +405,14 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is
if
(
myframe
->
IsGalCanvasActive
()
)
if
(
myframe
->
IsGalCanvasActive
()
)
galCanvas
->
Refresh
();
galCanvas
->
Refresh
();
else
else
myframe
->
GetCanvas
()
->
Refresh
();
myframe
->
RefreshCanvas
();
}
}
}
}
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
->
GetCanvas
()
->
Refresh
();
myframe
->
RefreshCanvas
();
}
}
void
PCB_LAYER_WIDGET
::
OnRenderEnable
(
int
aId
,
bool
isEnabled
)
void
PCB_LAYER_WIDGET
::
OnRenderEnable
(
int
aId
,
bool
isEnabled
)
...
@@ -430,7 +430,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
...
@@ -430,7 +430,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
if
(
myframe
->
IsGalCanvasActive
()
)
if
(
myframe
->
IsGalCanvasActive
()
)
galCanvas
->
Refresh
();
galCanvas
->
Refresh
();
else
else
myframe
->
GetCanvas
()
->
Refresh
();
myframe
->
RefreshCanvas
();
}
}
//-----</LAYER_WIDGET callbacks>------------------------------------------
//-----</LAYER_WIDGET callbacks>------------------------------------------
pcbnew/dialogs/dialog_display_options.cpp
View file @
ab4cb862
...
@@ -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
->
GetCanvas
()
->
Refresh
();
m_Parent
->
RefreshCanvas
();
EndModal
(
1
);
EndModal
(
1
);
}
}
pcbnew/dialogs/dialog_drc.cpp
View file @
ab4cb862
...
@@ -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
->
GetCanvas
()
->
Refresh
();
m_Parent
->
RefreshCanvas
();
}
}
...
...
pcbnew/dialogs/dialog_general_options.cpp
View file @
ab4cb862
...
@@ -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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
case
ID_TB_OPTIONS_SHOW_MODULE_RATSNEST
:
case
ID_TB_OPTIONS_SHOW_MODULE_RATSNEST
:
...
@@ -200,35 +200,35 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -200,35 +200,35 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
DisplayOpt
.
DisplayZonesMode
=
0
;
DisplayOpt
.
DisplayZonesMode
=
0
;
recache
=
true
;
recache
=
true
;
if
(
!
m_galCanvasActive
)
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
)
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
)
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
)
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
)
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
:
...
@@ -244,7 +244,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
...
@@ -244,7 +244,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
if
(
m_galCanvasActive
)
if
(
m_galCanvasActive
)
m_galCanvas
->
Refresh
();
m_galCanvas
->
Refresh
();
else
else
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
}
}
...
...
pcbnew/dialogs/dialog_global_deletion.cpp
View file @
ab4cb862
...
@@ -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
->
GetCanvas
()
->
Refresh
();
m_Parent
->
RefreshCanvas
();
m_Parent
->
OnModify
();
m_Parent
->
OnModify
();
EndModal
(
1
);
EndModal
(
1
);
...
...
pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp
View file @
ab4cb862
...
@@ -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
->
GetCanvas
()
->
Refresh
();
m_Parent
->
RefreshCanvas
();
}
}
...
...
pcbnew/dialogs/dialog_global_modules_fields_edition.cpp
View file @
ab4cb862
...
@@ -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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
void
PCB_BASE_FRAME
::
ResetModuleTextSizes
(
const
wxString
&
aFilter
,
bool
aRef
,
void
PCB_BASE_FRAME
::
ResetModuleTextSizes
(
const
wxString
&
aFilter
,
bool
aRef
,
...
...
pcbnew/dialogs/dialog_orient_footprints.cpp
View file @
ab4cb862
...
@@ -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
()
)
)
{
{
m_canvas
->
Refresh
();
RefreshCanvas
();
Compile_Ratsnest
(
NULL
,
true
);
Compile_Ratsnest
(
NULL
,
true
);
}
}
}
}
...
...
pcbnew/dialogs/dialog_set_grid.cpp
View file @
ab4cb862
...
@@ -216,7 +216,7 @@ bool PCB_BASE_FRAME::InvokeDialogGrid()
...
@@ -216,7 +216,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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
return
true
;
return
true
;
}
}
...
...
pcbnew/edit.cpp
View file @
ab4cb862
...
@@ -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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
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
()
);
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
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
()
);
m_canvas
->
Refresh
();
RefreshCanvas
();
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
()
);
m_canvas
->
Refresh
();
RefreshCanvas
();
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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
case
ID_POPUP_PCB_EDIT_DRAWING
:
case
ID_POPUP_PCB_EDIT_DRAWING
:
...
@@ -1287,7 +1287,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
...
@@ -1287,7 +1287,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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
// 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
...
@@ -1306,7 +1306,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
...
@@ -1306,7 +1306,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer )
setActiveLayer
(
layer
);
setActiveLayer
(
layer
);
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
...
pcbnew/edit_pcb_text.cpp
View file @
ab4cb862
...
@@ -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
m_canvas
->
Refresh
();
RefreshCanvas
();
#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
m_canvas
->
Refresh
();
RefreshCanvas
();
#endif
#endif
GetScreen
()
->
SetCrossHairPosition
(
aTextePcb
->
GetTextPosition
()
);
GetScreen
()
->
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
m_canvas
->
Refresh
();
RefreshCanvas
();
#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
m_canvas
->
Refresh
();
RefreshCanvas
();
#endif
#endif
}
}
pcbnew/editmod.cpp
View file @
ab4cb862
...
@@ -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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
#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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
case
PCB_MODULE_T
:
case
PCB_MODULE_T
:
...
...
pcbnew/edtxtmod.cpp
View file @
ab4cb862
...
@@ -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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
OnModify
();
OnModify
();
}
}
pcbnew/event_handlers_tracks_vias_sizes.cpp
View file @
ab4cb862
...
@@ -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.
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
pcbnew/footprint_wizard.cpp
View file @
ab4cb862
...
@@ -117,7 +117,7 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint()
...
@@ -117,7 +117,7 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint()
printf
(
"footprintWizard->GetModule() returns NULL
\n
"
);
printf
(
"footprintWizard->GetModule() returns NULL
\n
"
);
}
}
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
...
pcbnew/footprint_wizard_frame.cpp
View file @
ab4cb862
...
@@ -408,7 +408,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList()
...
@@ -408,7 +408,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList()
ReCreateParameterList
();
ReCreateParameterList
();
ReCreateHToolbar
();
ReCreateHToolbar
();
DisplayWizardInfos
();
DisplayWizardInfos
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
@@ -506,7 +506,7 @@ void FOOTPRINT_WIZARD_FRAME::ClickOnPageList( wxCommandEvent& event )
...
@@ -506,7 +506,7 @@ void FOOTPRINT_WIZARD_FRAME::ClickOnPageList( wxCommandEvent& event )
return
;
return
;
ReCreateParameterList
();
ReCreateParameterList
();
m_canvas
->
Refresh
();
RefreshCanvas
();
DisplayWizardInfos
();
DisplayWizardInfos
();
}
}
...
...
pcbnew/hotkeys_board_editor.cpp
View file @
ab4cb862
...
@@ -357,7 +357,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
...
@@ -357,7 +357,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
;
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
case
HK_DELETE
:
case
HK_DELETE
:
...
@@ -454,7 +454,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
...
@@ -454,7 +454,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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
}
}
...
@@ -538,7 +538,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
...
@@ -538,7 +538,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
;
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
case
HK_CANVAS_CAIRO
:
case
HK_CANVAS_CAIRO
:
...
...
pcbnew/modedit.cpp
View file @
ab4cb862
...
@@ -542,7 +542,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -542,7 +542,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
GetScreen
()
->
GetCurItem
()
->
ClearFlags
();
GetScreen
()
->
GetCurItem
()
->
ClearFlags
();
if
(
ret
>
0
)
if
(
ret
>
0
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
break
;
break
;
...
@@ -572,7 +572,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -572,7 +572,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
MoveCursorToCrossHair
();
if
(
ret
>
0
)
if
(
ret
>
0
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
break
;
break
;
...
@@ -661,38 +661,38 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -661,38 +661,38 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
MoveCursorToCrossHair
();
if
(
edge
)
if
(
edge
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
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
()
);
m_canvas
->
Refresh
();
RefreshCanvas
();
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
()
);
m_canvas
->
Refresh
();
RefreshCanvas
();
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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
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
()
);
m_canvas
->
Refresh
();
RefreshCanvas
();
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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
case
ID_POPUP_PCB_DELETE_EDGE
:
case
ID_POPUP_PCB_DELETE_EDGE
:
...
@@ -775,7 +775,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
...
@@ -775,7 +775,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
}
}
if
(
redraw
)
if
(
redraw
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
...
pcbnew/modedit_onclick.cpp
View file @
ab4cb862
...
@@ -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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
else
if
(
(
(
EDGE_MODULE
*
)
item
)
->
GetShape
()
==
S_SEGMENT
)
else
if
(
(
(
EDGE_MODULE
*
)
item
)
->
GetShape
()
==
S_SEGMENT
)
{
{
...
@@ -150,7 +150,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -150,7 +150,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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
break
;
break
;
...
@@ -436,7 +436,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -436,7 +436,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
m_canvas
->
MoveCursorToCrossHair
();
m_canvas
->
MoveCursorToCrossHair
();
if
(
ret
>
0
)
if
(
ret
>
0
)
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
break
;
break
;
...
@@ -448,7 +448,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -448,7 +448,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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
break
;
break
;
default
:
default
:
...
@@ -463,7 +463,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -463,7 +463,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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
break
;
break
;
...
...
pcbnew/modedit_undo_redo.cpp
View file @
ab4cb862
...
@@ -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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
@@ -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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
pcbnew/modules.cpp
View file @
ab4cb862
...
@@ -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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
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
)
m_canvas
->
Refresh
();
RefreshCanvas
();
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
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
}
}
...
...
pcbnew/modview.cpp
View file @
ab4cb862
...
@@ -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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
Update3D_Frame
();
Update3D_Frame
();
m_FootprintList
->
SetStringSelection
(
m_footprintName
);
m_FootprintList
->
SetStringSelection
(
m_footprintName
);
}
}
...
...
pcbnew/modview_frame.cpp
View file @
ab4cb862
...
@@ -411,7 +411,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
...
@@ -411,7 +411,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
ReCreateFootprintList
();
ReCreateFootprintList
();
ReCreateHToolbar
();
ReCreateHToolbar
();
DisplayLibInfos
();
DisplayLibInfos
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
@@ -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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
Update3D_Frame
();
Update3D_Frame
();
}
}
}
}
...
...
pcbnew/move_or_drag_track.cpp
View file @
ab4cb862
...
@@ -894,7 +894,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC )
...
@@ -894,7 +894,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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
return
true
;
return
true
;
}
}
pcbnew/netlist.cpp
View file @
ab4cb862
...
@@ -109,7 +109,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -109,7 +109,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
()
);
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
...
...
pcbnew/pcbframe.cpp
View file @
ab4cb862
...
@@ -790,11 +790,9 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer )
...
@@ -790,11 +790,9 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer )
rSettings
->
SetActiveLayer
(
ITEM_GAL_LAYER
(
PAD_FR_NETNAMES_VISIBLE
)
);
rSettings
->
SetActiveLayer
(
ITEM_GAL_LAYER
(
PAD_FR_NETNAMES_VISIBLE
)
);
}
}
}
}
view
->
UpdateAllLayersOrder
();
view
->
UpdateAllLayersOrder
();
view
->
UpdateAllLayersColor
();
view
->
UpdateAllLayersColor
();
if
(
m_galCanvasActive
)
m_galCanvas
->
Refresh
();
}
}
}
}
...
...
pcbnew/sel_layer.cpp
View file @
ab4cb862
...
@@ -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
)
{
{
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
}
}
...
...
pcbnew/xchgmod.cpp
View file @
ab4cb862
...
@@ -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
->
GetCanvas
()
->
Refresh
();
m_Parent
->
RefreshCanvas
();
}
}
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
->
GetCanvas
()
->
Refresh
();
m_Parent
->
RefreshCanvas
();
}
}
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
->
GetCanvas
()
->
Refresh
();
m_Parent
->
RefreshCanvas
();
}
}
if
(
pickList
.
GetCount
()
)
if
(
pickList
.
GetCount
()
)
...
...
pcbnew/zones_by_polygon.cpp
View file @
ab4cb862
...
@@ -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
);
m_canvas
->
Refresh
();
RefreshCanvas
();
int
ii
=
GetBoard
()
->
GetAreaIndex
(
aZone
);
// test if aZone exists
int
ii
=
GetBoard
()
->
GetAreaIndex
(
aZone
);
// test if aZone exists
...
...
pcbnew/zones_by_polygon_fill_functions.cpp
View file @
ab4cb862
...
@@ -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
();
m_canvas
->
Refresh
();
RefreshCanvas
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment