Fixup of last commit.

This commit is contained in:
Jeff Young 2018-09-07 13:01:01 +01:00
parent 0063f2c12d
commit 1e3a5c1b21
3 changed files with 14 additions and 8 deletions

View File

@ -179,8 +179,6 @@ void AbortBlockCurrentCommand( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
if( aPanel->IsMouseCaptured() ) // Erase current drawing on screen
{
// Clear block outline.
aPanel->CallMouseCapture( aDC, wxDefaultPosition, false );
aPanel->SetMouseCapture( NULL, NULL );
screen->SetCurItem( NULL );

View File

@ -1186,22 +1186,28 @@ void EDA_DRAW_FRAME::RefreshCrossHair( const wxPoint &aOldPos,
const wxPoint &aEvtPos,
wxDC* aDC )
{
wxFAIL_MSG( "shouldn't be using RefreshCrossHair() anymore; use CallMouseCapture() directly" );
// CrossHair is no longer XORed; no need for most of this
#if 0
wxPoint newpos = GetCrossHairPosition();
// Redraw the crosshair if it moved
//if( aOldPos != newpos )
if( aOldPos != newpos )
{
SetCrossHairPosition( aOldPos, false );
m_canvas->CrossHairOff( aDC );
SetCrossHairPosition( newpos, false );
m_canvas->CrossHairOn( aDC );
#endif
if( m_canvas->IsMouseCaptured() )
{
m_canvas->CallMouseCapture( aDC, aEvtPos, true );
}
#if 0
}
#endif
}
bool EDA_DRAW_FRAME::GeneralControlKeyMovement( int aHotKey, wxPoint *aPos,

View File

@ -256,10 +256,12 @@ bool SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KE
if( GetToolId() == ID_NO_TOOL_SELECTED )
m_canvas->CrossHairOff( aDC );
else
{
SetCrossHairPosition( pos, snapToGrid );
RefreshCrossHair( oldpos, aPosition, aDC );
}
m_canvas->CrossHairOn( aDC );
SetCrossHairPosition( pos, snapToGrid );
if( m_canvas->IsMouseCaptured() )
m_canvas->CallMouseCapture( aDC, aPosition, true );
if( aHotKey )
{