kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #01390
patch comments for Jonas
-
To:
kicad-devel@xxxxxxxxxxxxxxx
-
From:
Dick Hollenbeck <dick@...>
-
Date:
Tue, 01 Apr 2008 23:44:43 -0500
-
User-agent:
Thunderbird 2.0.0.12 (X11/20080227)
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