Commit 3e570c1a authored by jean-pierre charras's avatar jean-pierre charras

Fix cursor shape issue after block command in modedit and libedit

parent 6c4b6767
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment