Fix cursor shape issue after block command in modedit and libedit

This commit is contained in:
jean-pierre charras 2011-03-10 09:31:07 +01:00
parent 6c4b676758
commit 3e570c1afc
4 changed files with 12 additions and 6 deletions

View File

@ -183,7 +183,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC )
GetScreen()->m_BlockLocate.m_Command = BLOCK_IDLE;
GetScreen()->SetCurItem( NULL );
DrawPanel->SetMouseCapture( NULL, NULL );
SetToolID( GetToolId(), DrawPanel->GetDefaultCursor(), wxEmptyString );
SetToolID( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString );
DrawPanel->Refresh( true );
}
@ -269,7 +269,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
GetScreen()->SetCurItem( NULL );
DrawPanel->SetMouseCapture( NULL, NULL );
DrawPanel->Refresh( true );
SetToolID( GetToolId(), DrawPanel->GetDefaultCursor(), wxEmptyString );
SetToolID( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString );
}

View File

@ -136,8 +136,9 @@ void WinEDA_GerberFrame::HandleBlockPlace( wxDC* DC )
break;
}
DrawPanel->SetMouseCapture( NULL, NULL );
DrawPanel->EndMouseCapture( );
DrawPanel->SetCursor( DrawPanel->GetCurrentCursor() );
SetToolID( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString );
GetScreen()->SetModify();
GetScreen()->ClearBlockCommand();
@ -212,8 +213,9 @@ bool WinEDA_GerberFrame::HandleBlockEnd( wxDC* DC )
if( ! nextcmd )
{
GetScreen()->ClearBlockCommand();
DrawPanel->SetMouseCapture( NULL, NULL );
DrawPanel->EndMouseCapture( );
DrawPanel->SetCursor( DrawPanel->GetCurrentCursor() );
SetToolID( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString );
DisplayToolMsg( wxEmptyString );
}

View File

@ -194,7 +194,7 @@ bool WinEDA_ModuleEditFrame::HandleBlockEnd( wxDC* DC )
GetScreen()->ClearBlockCommand();
SetCurItem( NULL );
DrawPanel->SetMouseCapture( NULL, NULL );
SetToolID( GetToolId(), DrawPanel->GetDefaultCursor(), wxEmptyString );
SetToolID( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString );
DrawPanel->Refresh( true );
}
@ -276,7 +276,7 @@ void WinEDA_ModuleEditFrame::HandleBlockPlace( wxDC* DC )
SetCurItem( NULL );
DrawPanel->SetMouseCapture( NULL, NULL );
DrawPanel->Refresh( true );
SetToolID( GetToolId(), DrawPanel->GetDefaultCursor(), wxEmptyString );
SetToolID( GetToolId(), DrawPanel->GetCurrentCursor(), wxEmptyString );
}

View File

@ -126,6 +126,10 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
case ID_TB_OPTIONS_SHOW_RATSNEST:
SetElementVisibility( RATSNEST_VISIBLE, state );
if( state && (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 )
{
Compile_Ratsnest( NULL, true );
}
DrawPanel->Refresh();
break;