← Back to team overview

kicad-developers team mailing list archive

patch comments for Jonas

 

Jonas,

Your recent patch looks like this:

Index: eeschema/schedit.cpp
===================================================================
--- eeschema/schedit.cpp (revision 961)
+++ eeschema/schedit.cpp (working copy)
@@ -712,13 +712,17 @@
break;

case ID_SCHEMATIC_UNDO:
- if( GetSchematicFromUndoList() )
+ if( GetSchematicFromUndoList() ){
+ TestDanglingEnds( GetScreen()->EEDrawList, &dc );
DrawPanel->Refresh( TRUE );
+ }
break;

case ID_SCHEMATIC_REDO:
- if( GetSchematicFromRedoList() )
+ if( GetSchematicFromRedoList() ){
+ TestDanglingEnds( GetScreen()->EEDrawList, &dc );
DrawPanel->Refresh( TRUE );
+ }


Some comments:


1) In cases where we are going to redraw the entire screen anyway with Refresh(), we should pass NULL to the TestDanglingEnds() as the DC argument. The NULL will cause it to skip the drawing of the dangling ends, but it will still do the calculations. The subsequent Refresh() will then do the drawing.


2) Your use of the opening { bracket is not consistent with the style we adopted a year ago. Look around please. If in doubt run uncrustify on it. It goes on the next line please.



Thanks,

Dick









Follow ups