Draw panel object refactoring and other minor code cleaning.

* Rename all member variables and methods that reference the cross hair
  code in draw panel object from cursor to cross hair to eliminate confusion
  between the two concepts.
* Rename cursor capture call backs in draw panel object to improve code
  readability.
* Create helper class for turning off the cross hair while drawing.
* Remove redundant block clear code.
* Remove redundant mouse capture call back reset code when end capture
  call back is called.
* Remove unused function definitions in base draw frame object.
* Lots of minor coding policy and doxygen comment fixes.
This commit is contained in:
Wayne Stambaugh
2011-02-11 15:48:13 -05:00
parent 25fe492022
commit 7b8b51b240
110 changed files with 1218 additions and 1307 deletions
+5 -4
View File
@@ -126,10 +126,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* aDC, TRACK* aTrackItem )
{
TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItemLink( 0 );
wxASSERT( oldsegm );
DrawPanel->CursorOff( aDC ); // Erase cursor shape
DrawPanel->CrossHairOff( aDC ); // Erase cursor shape
oldsegm->Draw( DrawPanel, aDC, GR_XOR ); // Erase old track shape
aTrackItem->Draw( DrawPanel, aDC, GR_OR ); // Display new track shape
DrawPanel->CursorOn( aDC ); // Display cursor shape
DrawPanel->CrossHairOn( aDC ); // Display cursor shape
}
SaveCopyInUndoList( itemsListPicker, UR_CHANGED );
}
@@ -167,7 +167,8 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment )
// Some segment have changed: redraw them and save in undo list
if( aDC )
{
DrawPanel->CursorOff( aDC ); // Erase cursor shape
DrawPanel->CrossHairOff( aDC ); // Erase cursor shape
for( unsigned ii = 0; ii < itemsListPicker.GetCount(); ii++ )
{
TRACK* segm = (TRACK*) itemsListPicker.GetPickedItemLink( ii );
@@ -176,7 +177,7 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* aDC, TRACK* aTrackSegment )
segm->Draw( DrawPanel, aDC, GR_OR ); // Display new track shape
}
DrawPanel->CursorOn( aDC ); // Display cursor shape
DrawPanel->CrossHairOn( aDC ); // Display cursor shape
}
SaveCopyInUndoList( itemsListPicker, UR_CHANGED );